2010-12-26 81 views

答えて

6

leftrightの両方のCSSプロパティを0に設定します。

キックオフ例:

<!DOCTYPE html> 
<html lang="en"> 
    <head> 
     <title>SO question 4535198</title> 
     <style> 
      #strip { 
       position: absolute; 
       top: 0; 
       left: 0; 
       right: 0; 
       height: 2px; 
       background-image: url('some.png'); 
      } 
     </style> 
    </head> 
    <body> 
     <div id="strip"></div> 
    </body> 
</html> 
0

はこれを試してみてください:

<style type="text/css"> 
.hrBar 
{ 
     background-image: url('<YOUR_IMAGE_PATH>'); 
     background-repeat: repeat-x; 
     height: 1px; // Or the Height of your Image 
     position: absolute; 
} 
</style> 
<div class="hrBar"> 
</div> 
関連する問題