11.圆角外边框

圆角外边框


<!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>

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值