rss· 投稿· 设为首页· 加入收藏· 繁體版
当前位置: 火魔网 » 程序开发 » html/css

《CSS制作圆角效果》

1、
HTML代码 <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用CSS样式定义的圆角表格</title>
</head>
<style type="text/css">
body{padding: 20px;background-color: #FFF;
     font: 100.01% "Trebuchet MS",Verdana,Arial,sans-serif}
h1,h2,p{margin: 0 10px}
h1{font-size: 250%;color: #FFF}
h2{font-size: 200%;color: #f0f0f0}
p{padding-bottom:1em}
h2{padding-top: 0.3em}
div#nifty{ margin: 0 10%;background: #9BD1FA}
b.rtop, b.rbottom{display:block;background: #FFF}
b.rtop b, b.rbottom b{display:block;height: 1px;
     overflow: hidden; background: #9BD1FA}
b.r1{margin: 0 5px}
b.r2{margin: 0 3px}
b.r3{margin: 0 2px}
b.rtop b.r4, b.rbottom b.r4{margin: 0 1px;height: 2px}
</style>
</head>
<body>
<div id="nifty">
<b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b>
CSS制作圆角效果1
<b class="rbottom"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b>
</div>
</body>
</html>
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行] 2、
HTML代码 <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>CSS制作圆角效果</title>
<style type="text/css">
<!--
.bim212{ width:auto;
height:auto; .bim-tt,.bim-bb,.bim-tm,.bim-bm,.bim-tb,.bim-bt,.bim-m{ border-color:#FF6347; .bim-t,.bim-b{ width:auto;
height:4px;
font-size:0;
line-height:0; .bim-tt,.bim-bb{
width:auto;
height:0;
margin:0 4px;
border-top-width:1px;
border-top-style:solid; .bim-tm,.bim-bm{
width:auto;
height:1px;
margin:0 2px;
border-left-width:2px;
border-right-width:2px;
border-left-style:solid;
border-right-style:solid; .bim-tb,.bim-bt{
width:auto;
height:2px;
margin:0 1px;
border-left-width:1px;
border-right-width:1px;
border-left-style:solid;
border-right-style:solid; .bim-m{
width:auto;
height:auto;
padding:3px;
border-left-width:1px;
border-right-width:1px;
border-left-style:solid;
border-right-style:solid; -->
</style></head>
<body>
<div class="bim212">
<!-- S top -->
<div class="bim-t">
<div class="bim-tt"></div>
<div class="bim-tm"></div>
<div class="bim-tb"></div>
</div>
<!-- E top -->
<!-- S main -->
<div class="bim-m"> </div>
<!-- E main -->
<!-- S bottom -->
<div class="bim-b">
<div class="bim-bt"></div>
<div class="bim-bm"></div>
<div class="bim-bb"></div>
</div>
<!-- E bottom -->
</div>
</body>
</html>
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]
顶一下
(0)
踩一下
(0)