CSS,圆角看代码吧: XHTML 代码:
<div class="box1"> <span class="tl"></span><span class="tr"></span> <div class="cc"> <p>圆角一</p> </div> <span class="bl"></span><span class="br"></span> </div>
CSS 代码:
.box1 { background:url(images/bg1.gif) repeat-x #1d6cb7; margin-top:1em; position:relative; zoom:1; width:778px; } .box1 .tl, .box1 .tr, .box1 .bl, .box1 .br { width:5px; height:5px; position:absolute; background:url(images/bg3.gif) no-repeat; overflow:hidden; } .box1 .cc { height:40px; padding:5px; } .box1 .tl { left:0; top:0; } .box1 .tr { right:0; top:0; background-position:0 -5px; } .box1 .bl { left:0; bottom:0; background-position:0 -10px; } .box1 .br { right:0; bottom:0; background-position:0 -15px; }
看看上面代码所用到的图片能更好的理解(下面): 第一部分是左上角的,第二部分是右上角的,第三部分是左下角的,第四部分是右下角的。
提示:您可以先修改部分代码再运行
CSS,圆角
|