圆角外边框
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style type="text/css">
div{
width:500px;
height:500px;
border:2px #F00 solid;
background-color:#CF0;
margin:100px;
}
div.c1{
border-radius:50%;
}
div.c2{
border-radius:200px;
}
div.c3{
border-radius:200px 100px;;
}
div.c4{
border-radius:200px 100px 50px;
}
div.c5{
border-radius:200px 100px 50px 25px;
}
</style>
</head>
<body>
<div></div><!--为设置时-->
<div class="c1"></div><!--用百分比-->
<div class="c2"></div><!--设置像素时,顺时针,和边框一样,不过它时将左上角为起点-->
<div class="c3"></div>
<div class="c4"></div>
<div class="c5"></div>
</body>
</html>
实例
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style type="text/css">
a{
width:100px;
height:100px;
border:1px #F00 solid;
background-color:#FFF;
color:#F00;
text-align:center;
line-height:100px;
display:inline-block;
border-radius:50%;
margin:auto 100px;
text-decoration:none;
}
a:hover{
background-color:#F00;
color:#FFF;
}
</style>
</head>
<body>
<a href="#">文字1</a>
<a href="#">文字1</a>
<a href="#">文字1</a>
<a href="#">文字1</a>
</body>
</html>
运用到导航栏上
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style type="text/css">
div{
width:500px;
height:400px;
background:url(../image/1.PNG) no-repeat top center;
margin:auto;
}
.c1,.c2,.c3,.c4{
width:10px;
height:10px;
border-radius:50%;
background:#6FF;
display:inline-block;
margin:280px 10px 10px;
}
.c1{
margin-left:200px;
}
.c1:hover,.c2:hover,.c3:hover,.c4:hover{
background:#00F;
}
</style>
</head>
<body>
<div href="#">
<a class="c1"></a>
<a class="c2"></a>
<a class="c3"></a>
<a class="c4"></a>
</div>
</body>
</html>