我想浮动两个div并设置背景图像给他们。但我无法得到的期望的外观。浮动2 div和背景图像
这是我想做的事
但是,这是我所得到的
我的HTML
<div class="orange_bk">Outstanding</div> <div class="black_bk">Play</div>
CSS
.orange_bk{
float: left;
background: url(../images/Outstanding%20button.png);
background-position: 8px -10px;
width: 45%;
height: 33px;
background-repeat: no-repeat;
line-height: 23px;
text-align: center;
font-size: 15px;
}
.black_bk{
float: right;
background: url(../images/Play%20Button.png);
background-position: 8px -10px;
width: 45%;
height: 33px;
background-repeat: no-repeat;
line-height: 23px;
text-align: center;
font-size: 15px;
}
这是两个IMAG ES我用
怎么样'背景:NO-重复网址(../ images/Outstanding%20button.png)8px 0;'并且删除所有其他背景的实例 – Morpheus
不会影响:( – MJM
您可以使用您的图像进行代码的实时演示... 。 那会 我们更容易理清你的问题。 –