欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

滑動(dòng)門 圓角背景寬度和高度自適應(yīng)

  發(fā)布時(shí)間:2012-02-17 22:42:48   作者:佚名   我要評(píng)論
實(shí)現(xiàn)的方法很簡單,其實(shí)就是套2層,其中外層用長背景,內(nèi)層用短背景蓋住。拿高度自適應(yīng)來說,可以用一個(gè)div(用長背景居底鋪)嵌套一個(gè)h2(用短背景居頂鋪)標(biāo)簽

第一張圖用于高度自適應(yīng),第二張用于寬度自適應(yīng)。如果覺得不夠高或?qū)?,可以修改圖片。
實(shí)現(xiàn)的方法很簡單,其實(shí)就是套2層,其中外層用長背景,內(nèi)層用短背景蓋住。拿高度自適應(yīng)來說,可以用一個(gè)div(用長背景居底鋪)嵌套一個(gè)h2(用短背景居頂鋪)標(biāo)簽。
圓角背景高度自適應(yīng):

復(fù)制代碼
代碼如下:

<style type="text/css">
body,div,p,h2{ margin:0; padding:0;}
div{width:262px; margin:100px auto 0; background:url(images/hua1.png) right bottom no-repeat; overflow:hidden;}
h2{ width:262px; height:36px; text-indent:35px; background:url(images/hua1.png) left top no-repeat;}
div p{ padding:10px;}
</style>
<div>
<h2>標(biāo)題</h2>
<p>內(nèi)容內(nèi)容內(nèi)容內(nèi)容內(nèi)容內(nèi)容內(nèi)容內(nèi)容內(nèi)容內(nèi)容內(nèi)容內(nèi)容
內(nèi)容內(nèi)容內(nèi)容內(nèi)容內(nèi)容內(nèi)容內(nèi)容內(nèi)容內(nèi)容內(nèi)容內(nèi)容內(nèi)容
</p>
</div>

寬度自適應(yīng)的圓角按鈕原來是一樣的,只不過是改成橫向的:

復(fù)制代碼
代碼如下:

<style type="text/css">
body,ul,li{ margin:0; padding:0;}
ul{ list-style:none; overflow:hidden;}
li{ float:left; display:inline; height:30px; margin-left:10px; background:url(images/hua2.png) right top no-repeat;}
li span{ float:left; display:block; height:30px; padding:0 10px; line-height:30px; text-align:center; background:url(images/hua2.png) left bottom no-repeat;}
</style>
<ul>
<li><span>三個(gè)字</span></li>
<li><span>六個(gè)字六個(gè)字</span></li>
</ul>

相關(guān)文章

最新評(píng)論