-1
響應設置背景圖片的我在CSS reponsive背景圖片的問題,我的CSS代碼是: -如何在CSS
/*** Map ***/
ul#continents {
list-style: none;
background: url(images/map.png) no-repeat 0 0;
position: relative;
width: 580px;
height: 268px;
margin: 0;
padding: 0;
}
ul#continents li {
position: absolute;
}
ul#continents li a{
display: block;
height: 100%;
text-decoration: none;
}
和HTML: -
<ul id="continents">
<li id="northamerica">
<a href="http://en.wikipedia.org/wiki/North_America">
<span>
<strong>North America</strong>
Population: 528,720,588
</span>
</a>
</li>
....
我該如何設置圖像「map.png」作爲響應。
注:我使用的地圖工具來得到任何國家
您可以使用background:position來顯示完整背景的特定部分 – 2014-10-02 09:17:03