<ul>
<li style="background-image: url(http://fanyi.baidu.com/asset/fanyi-logo.png); padding-bottom: 3px; line-height: 16px; background-color: transparent; list-style-type: none; margin: 0px; padding-left: 10px; padding-right: 10px; background-position: 0% 7px; padding-top: 3px; background-origin: initial; background-clip: initial"> </li>
</ul>
我只想显示一个就够了,结果显示满了
怎么搞?
------解决方案--------------------
加上 background-repeat:no-repeat ;
<li style="background-image: url(http://fanyi.baidu.com/asset/fanyi-logo.png); padding-bottom: 3px; line-height: 16px; background-color: transparent; list-style-type: none; margin: 0px; padding-left: 10px; padding-right: 10px; background-position: 0% 7px; padding-top: 3px; background-origin: initial; background-clip: initial;
background-repeat:no-repeat ;
"> </li>
</ul>?
------解决方案--------------------
少了一句:background-repeat:no-repeat;
====================
其实你可以合并为一个background属性:
background:transparent url('http://fanyi.baidu.com/asset/fanyi-logo.png') no-repeat;
具体参考一下这里http://www.dreamdu.com/css/property_background/