2

次のコードを試しました:

CSS:

.bg_left{
        background-image: url(path/image.jpeg);
        background-repeat: no-repeat;
        background-position: left bottom;
         background-color: #FF0000;
         color:#FFFFFF;
         height:150px;

}
table{width:100%;}

HTML:

<!DOCTYPE HTML>
<html>
<head>
<title>HTML5 responsive website tutorial</title>

</head>
<body>
<table>
   <tr class="bg_left">
      <td>Helloo
      </td>
      <td>Logout</td>
    </tr>
</table>
</body>
</html>

しかし、IE と Firefox では問題なく動作するのに、なぜ chrome では繰り返されるのでしょうか?

4

4 に答える 4

3

CSS

.bg_left{
  background-image: url(images/banner1.jpg);
  background-repeat: no-repeat;
  background-position: left top;
  background-attachment:fixed;
  background-color: #FF0000;
  color:#FFFFFF;
  height:150px;
}
table{
  width:100%;
}

HTML

<table>
   <tr class="bg_left">
      <td>Helloo</td>
      <td>Logout</td>
    </tr>
</table>
于 2013-11-01T05:53:22.537 に答える
2

クラス名はあなたのHTMLですbg_left. しかし、あなたが使用するbg-leftのはあなたのCSSファイルです

于 2013-10-30T06:36:22.807 に答える
0
    .bg_left{
        background-image: url(images/6.jpg);
        background-repeat: no-repeat;
        background-position: left bottom;

}
<table>
   <tr class="bg_left">
      <td>
      </td>
    </tr>
</table>
于 2013-10-30T06:48:15.127 に答える