本文章利用了css url背景图片来实现的滑动门做圆角框这种方法也是开发美工常用的方法,有需要的朋友可以看看。
代码如下
复制代码
<style type="text/css">
.rounded{
font:Arial, Helvetica, sans-serif;
background:url(sl.gif) top left no-repeat;
width:90%;
}
.rounded h3{
margin:0 0 -25px 0;
padding:20px 20px 10px;
background:url(sr.gif) no-repeat top right;
}
.rounded div.main {
text-indent:2em;
margin:-1em 0 0 0;
padding:0 0 0 0px;
background:url(bottom.gif) top right repeat-y;
}
.roundeddiv.footer{
text-indent:2em;
margin:-2.5em 0 -0.5em 0px;
padding:0px 0 0 0 ;
background:url(xr.gif) right bottom no-repeat;
}
.rounded div.footer p{
display:block;
margin:-1.5em 30px 0 0;
padding:30px 0px 62px 10px;
background:url(xl.gif) left bottom no-repeat;
}
</style>
</head>
<body>
<div class="rounded">
<h3> 这是二维滑动门</h3>
<div class="main">
<p>是什么司联合两节课了科技特哦和人工个化工为肌肤了化工网化工人和用途工</p>
</div>
<div class="footer">
<p>么我港口而佛号开放化工额</p>
</div>
</div>
</body>
实例二
代码如下
复制代码
<style type="text/css">
#rounded{
margin:0;
padding:0;
width:400px;
background:#ccc url(left_top.gif) no-repeat;
}
#rounded h3{
text-align:center;
margin:0;
padding:30px 0 15px 10px;
background:url(right_top.gif) no-repeat right top;
}
#rounded p{
margin:0;
padding:0;
background:url(left_bottom.gif) no-repeat left bottom;
}
#rounded p span{
text-indent:2em;
margin:0;
padding:0 5px 30px 10px;
display:block;
background:url(right_bottom.gif) no-repeat right bottom;
}
</style>
<body>
<div id="rounded">
<h3>我们是家伙管理卡就是都</h3>
<p><span>受到顾客我就会更快可怜的价格拍得更欧赔赶紧陪我而绝非角度看过了来的快速进攻挖掘客我就会更快可怜的价格拍得更欧赔赶紧陪我而绝非角度看过了来的快速客我就会更快可怜的价格拍得更欧赔赶紧陪我而绝非度看过了来的快速客我就会更快可怜的价格拍得欧赔赶紧陪我而绝非角度看过了来的快速客我就会更快可怜的价格拍欧赔赶紧陪我而绝非度看过了来的快速是内容。</span></p>
</div>
</body>