最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

滑動門 圓角背景寬度和高度自適應

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

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

復制代碼
代碼如下:

<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>標題</h2>
<p>內容內容內容內容內容內容內容內容內容內容內容內容
內容內容內容內容內容內容內容內容內容內容內容內容
</p>
</div>

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

復制代碼
代碼如下:

<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>三個字</span></li>
<li><span>六個字六個字</span></li>
</ul>

相關文章

最新評論

黄平县| 墨脱县| 定襄县| 吴旗县| 靖江市| 枝江市| 惠来县| 剑阁县| 古丈县| 沧州市| 宁安市| 穆棱市| 邢台市| 长白| 五华县| 达尔| 招远市| 灌云县| 平果县| 个旧市| 宝鸡市| 沿河| 沙河市| 思南县| 峨边| 博客| 四川省| 昭觉县| 寿阳县| 师宗县| 肃南| 谷城县| 锡林郭勒盟| 白银市| 县级市| 天峻县| 宿迁市| 分宜县| 尚义县| 磐安县| 永吉县|