您现在的位置:首页 >> 前端 >> 内容

CSS+DIV实现圆角

时间:2013/11/18 14:06:23 点击:

  核心提示:下面是整个页面的源码,复制-粘贴-保存成html文档-可见效果:strong/strong!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional...
下面是整个页面的源码,复制->粘贴->保存成html文档->可见效果:

 

<strong><</strong>!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<html xmlns="https://www.w3.org/1999/xhtml">  
<head>  
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
<title>CSS+DIV圆角</title>  
<style type="text/css">  
  
#divcss5 {background: transparent; margin:1em;}  
  
/*圆角样式 */  
.xtop, .xbottom {display:block; background:transparent; font-size:1px;}  
.xb1, .xb2, .xb3, .xb4 {display:block; overflow:hidden;}  
.xb1, .xb2, .xb3 {height:1px;}  
.xb2, .xb3, .xb4 {background:#FCC; border-left:1px solid #F69; border-right:1px solid #F69;}  
.xb1 {margin:0 5px; background:#F69;}  
.xb2 {margin:0 3px; border-width:0 2px;}  
.xb3 {margin:0 2px;}  
.xb4 {height:2px; margin:0 1px;}  
  
.xboxcontent {display:block; background: #FCC; border:0 solid #F69; border-width:0 1px;}  
/*圆角样式 */  
  
</style>  
</head>  
  
<body>  
<p id="pcss5">  
<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>  
<p class="xboxcontent" align="center" style="color:#FF0">  
<b>p + css圆角,无需图片</b>  
</p>  
<b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"></b></b>  
</p>  
</body>  
</html>  

 


Tags:CS SS SD DI 
作者:网络 来源:不详