纯CSS让IE7/IE8浏览器实现正圆角效果

<!DOCTYPE html>
<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>纯CSS让IE7,IE8浏览器实现正圆角效果</title>
	<style type="text/css">
	/*主要CSS*/
	* { padding: 0; margin: 0; }
	.box { width: 150px; height: 150px; line-height: 150px; position: relative; overflow: hidden; margin:100px auto; }
	.radius { position: absolute; width: 100%; height: 100%; margin: 0 0 1px 1px;
		/* IE7,IE8圆尺寸要小1像素同时有1像素偏移 */ 
		border-radius: 50%; 
		border: 149px dotted; 
		border-width: 0vw; 
		margin: 0vw; 
		color: #33CCCC; 
		background-color: currentColor; 
		/*currentColor是 color 属性的值,具体意思是指:currentColor关键字的使用值是 color 属性值的计算值。
		如果currentColor关键字被应用在 color 属性自身,则相当于是 color: inherit。
		*/
	}
	.text { position: relative; color: #fff; text-align: center; font-size: 24px; }
	.box:hover .radius{ color: #FF6600; }
	.radius_i{
		margin:100px auto;
		width: 150px; 
		height: 150px;
		overflow: hidden;
		position: relative;
	}
	.radius_i i{
		position: absolute; 
		width: 100%; 
		height: 100%;
		border-radius: 50%; 
		border: 149px dotted; 
		border-width: 0vw; 
		margin: 0vw; 
		color: #33CCCC; 
		background-color: currentColor; 
	}
	</style>
	</head>
<body>
	<div class="box"> 
		<i class="radius"></i>
	  	<p class="text">Internetke</p>
	</div>
	<div class="radius_i">
		<i></i>
	</div>
</body>
</html>


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值