curvycorners控件在chrome 谷歌浏览器下 会产生上下边框变黑色 的情况,解决办法...

curvycorners,一个网页Elements圆角的js实现。浏览及使用 看这里
2011040321520984.jpg
测试代码:
<html>
<head>
<style type="text/css">
	#Test1{border:solid 1px red;width:200px;height:200px;}
	#Test2{border:solid 1px blue; background:white;width:200px;height:200px;}
	#Test3{border:solid 1px green; background:#EEE;width:200px;height:200px;}
</style>
</head>
<body>
<div id="Test1">
<h3>Test1</h3>
<p>without background-color seted #FFFFFF(white)</p>
</div>
<p/>
<div id="Test2">
<h3>Test2</h3>
<p>the div's background-color was seted #FFFFFF</p>
</div>
<p/>
<!--<div id="Test3">
<h3>Test3</h3>
<p>the div's background-color was seted #EEE</p>
</div>-->
<script type="text/javascript" src="curvycorners.src.js"></script>
<script type="text/javascript">

	function initCorners() {
		var settings = {
		  tl: { radius: 5 },
		  tr: { radius: 5 },
		  bl: { radius: 5 },
		  br: { radius: 5 },
		  antiAlias: true
		}
		curvyCorners(settings, "#Test1");
		curvyCorners(settings, "#Test2");
		curvyCorners(settings, "#Test3");
	  }
     initCorners();
</script>
</body>
</html>
当元素的backgroundcolor 未设置时,curvycorners在chrome浏览器中
 
   
var boxColour = curvyBrowser.get_style( this .box, " backgroundColor " );
时获取的boxColour是rgb(0,0,0)黑色,然后生成的圆角边框导致上限边框变成两条黑色的粗条。
解决办法很简单,就是在该元素的css中加入background-color:#FFF; 。

转载于:https://www.cnblogs.com/klvk/archive/2011/04/03/2004833.html

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值