手机
当前位置:查字典教程网 >网页设计 > Div+Css教程 >实现CSS3中的border-radius(边框圆角)示例代码
实现CSS3中的border-radius(边框圆角)示例代码
摘要:实现边框圆角-moz-border-radius:32px;-webkit-border-radius:32px;border-radius...

实现边框圆角

-moz-border-radius: 32px;

-webkit-border-radius: 32px;

border-radius: 32px;

behavior: url(border-radius.htc);

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<style type="text/css">

body {

background-color: #fff;

font: normal 11pt Trebuchet MS,Arial,sans-serif;

}

.box1 {

background-color: #f0f0f0;

width: 533px;

height: 50px;

margin: 0 auto 50px auto;

padding: 20px;

border: 1px solid #d7d7d7;

-moz-border-radius: 11px;

-webkit-border-radius: 11px;

border-radius: 10px;

}

.box2 {

background: transparent url(ashera.jpg); no-repeat top left;

width: 420px;

height: 220px;

margin: 0 auto 35px auto;

padding: 30px;

color: #fff;

font-weight: bold;

border: 11px solid #35b70e;

-moz-border-radius: 32px;

-webkit-border-radius: 32px;

border-radius: 32px;

behavior: url(border-radius.htc);

}

.box3 {

background-color: #ddd;

width: 210px;

height: 30px;

padding: 20px;

position: absolute;

top: 5px; left: 5px;

-moz-border-radius: 15px;

-webkit-border-radius: 15px;

border-radius: 15px;

behavior: url(border-radius.htc);

}

.rel {

margin: 50px 0 0 33px;

padding: 25px;

position: relative;

z-index: inherit;

zoom: 1; /* For IE6 */

}

</style>

</head>

<body>

<p>Not just divs, but any element*</p>

<div>

<div>

11 lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet

</div>

<div>

22 this cat is a hybrid of domestic and wild breeds :)

</div>

<div>

33 this box is absolutely positioned

</div>

</div>

</body>

</html>

【实现CSS3中的border-radius(边框圆角)示例代码】相关文章:

CSS教程:可扩展圆角标签

利用CSS3实现毛玻璃效果示例源码

DIV+CSS常用的网页布局代码

css实现文字的自动隐藏

给表格设置不重叠的边框(单线边框)的2种方法

多步骤进度条的实现原理及代码

CSS里随滚动条滚动代码

谈谈CSS的边距合并之我的理解

兼容好的css透明代码

IE6定义1px左右高度的容器示例代码

精品推荐
分类导航