百度空间的圆角矩形

来源:互联网 发布:java中 是什么意思 编辑:程序博客网 时间:2024/05/21 22:51
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>百度空间右侧圆角矩形分析 - by:hewei.org</title>
<style type="text/css">
.b2{margin:100px;border:1px solid #CCCCCC;}
.tl1{
background-position:0% 0%;
font-size:0;
float: left;
left: -1px;
top: -1px;
background-image: url(http://img.baidu.com/hi/img/index/rc.gif);
position: relative;
height: 5px;
width: 5px;
}
.tr1{
background-position:100% 0%;
font-size: 0px;
background-image: url(http://img.baidu.com/hi/img/index/rc.gif);
float: right;
position: relative;
height: 5px;
width: 5px;
top: -1px;
right: -1px;
}
.bl1{
background-position:0% 100%;
font-size: 0px;
background-image: url(http://img.baidu.com/hi/img/index/rc.gif);
float: left;
left: -1px;
top: 1px;
position: relative;
height: 5px;
width: 5px;
}
.br1{
background-position:100% 100%;
font-size: 0px;
background-image: url(http://img.baidu.com/hi/img/index/rc.gif);
float: right;
height: 5px;
width: 5px;
position: relative;
top: 1px;
right: -1px;
}
.rcb,.rct {clear:both;height:5px;}
</style>
</head>
<body>
<div class="b2">
<div class="rct"><div class="tl1"></div><div class="tr1"></div>
</div>
    <h1>百度空间右侧圆角矩形分析 - by:hewei.org</h1>
    <p>只用到了一个10X10px的小圆形图片,通过对该图片的定位来达到圆角矩形的目的,虽然对于seo来说,部分控制代码不符合内容表现形式分离,不过代码比较简洁,还是比较不错的。自适应高度,兼容各大浏览器。</p>
<div class="rcb"><div class="bl1"></div><div class="br1"></div>
</div>
</div>
</body>
</html>
0 0