<html>
<style type="text/css">
div.roundedcorner{background: #3a6ea5; width: 200px; color:white}
b.r {display:block;background: #fff}
b.r b {display:block;height: 1px;overflow: hidden; background: #3a6ea5}
b.r1{margin: 0 5px}
b.r2{margin: 0 3px}
b.r3{margin: 0 2px}
b.r b.r4{margin: 0 1px;height: 2px}
</style>
<div class="roundedcorner">
<b class="r"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b>
<div style="padding-left:14px;">
Your web, your choise
</div>
<b class="r"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b>
</div>
</html>
原理:
实际是4个b,设置为块状显示,所以会换行,然后上面是4个换行,动态设置了4个行的左右缩进为5 3 2 1 , 设置离div最近的b的高度为其他的高度的两倍 这样看起来就像是一个圆角了。
下面的反过来。
605

被折叠的 条评论
为什么被折叠?



