当前位置: 首页 > 图文教程 > 网页制作 > CSS样式表 > 百度有啊 CSS圆角实现代码

CSS样式表
CSS 关于网页图片的属性
CODEPAGE 列表与asp应用例子
html 的 ContentType 小结
不要使用CSS Expression的原因分析
css ie6 ie7 ff的CSS hack使用技巧
div+CSS网页布局的意义与副作用原因小结
iframe自适应高度的多种方法方法小结
css display:none使用注意事项小结
html工作中表格<tbody>标签的使用技巧
input为disabled提交后得不到该值的解决方法
Css Reset(复位)方法整理
css首字放大实例代码
让IE ff Opera同时支持Alpha透明的方法
WEB标准网页布局中尽量不要使用的HTML标签
css网页布局中注意的几个问题小结
指定网页的doctype解决CSS Hacking方法总结
左侧固定宽度,右侧自适应宽度的CSS布局
DIV+CSS经常用到的属性、参数及说明
校内网css代码添加背景图片常用代码
css 通配符用法总结

CSS样式表 中的 百度有啊 CSS圆角实现代码


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-10   浏览: 129 ::
收藏到网摘: n/a

看代码吧: 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圆角方案 - 晨洋 - Web Design ⊙学会分享 
第一部分是左上角的,第二部分是右上角的,第三部分是左下角的,第四部分是右下角的。




提示:您可以先修改部分代码再运行