jQuery 角落插件无法在 Internet Explorer 上运行
我有一个问题,div 没有在 IE 中添加圆角,但在 chrome 和 firefox 中工作正常。 它似乎将角变圆,但去除了边框颜色。如果突出显示呈现的页面,您可以看到舍入。
有什么想法为什么会发生这种情况以及如何解决它吗? 我正在使用从 http://jquery.malsup.com/corner/ 下载的 2.03 版 jquerycorner
<html>
<head>
<style>
#content{ border: solid 6px #888888;}
#content2{ border: solid 6px #888888;}
</style>
<script type="text/javascript" src="include/script/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="include/script/jquery.corners.js"></script>
<script type="text/javascript">
$(function(){
$('.content').corner("round 8px").parent().css('padding', '8px').corner("round 14px");
$('#content2').corner();
});
</script>
</head>
<body>
<div id="content" class="content">
content
</div>
<div id="content2" class="content2">
content
</div>
</body>
</html>
I have an issue where a div is not getting rounded corners added in IE but it works fine in chrome and firefox.
It appears to round the corners but removes the border colours. You can see the rounding if you highlight the rendered page.
Any ideas why this is happening and how to fix it?
I'm using version 2.03 of jquery corners downloaded from http://jquery.malsup.com/corner/
<html>
<head>
<style>
#content{ border: solid 6px #888888;}
#content2{ border: solid 6px #888888;}
</style>
<script type="text/javascript" src="include/script/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="include/script/jquery.corners.js"></script>
<script type="text/javascript">
$(function(){
$('.content').corner("round 8px").parent().css('padding', '8px').corner("round 14px");
$('#content2').corner();
});
</script>
</head>
<body>
<div id="content" class="content">
content
</div>
<div id="content2" class="content2">
content
</div>
</body>
</html>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
圆角可以在 IE 中使用。唯一的问题是圆角,边框在
'jquery.corners'
api 中消失,如果您的容器颜色与背景不同,您会注意到它。
所以,是的,
jquery.corner
api 有一个小问题。Rounded Corners do work in IE. The only glitch is with rounded corners, the border disappears with
'jquery.corners'
api,If your container color is different from the background you will notice it.
So yes there is a slight problem with the
jquery.corner
api.取自 http://jquery.malsup.com/corner/ - “最近我添加了对支持它的浏览器(Opera 10.5+、Firefox、Safari 和 Chrome)中的本机边框半径舍入,因此在这些浏览器中,插件只需在元素上设置 css 属性,但在 IE 中,我们必须等待版本。 9 之前的浏览器都支持,选择“圆形”以外的模式需要使用“div stips”方法“
因此圆角在 IE 中不起作用,但任何其他角样式都可以。
Taken from http://jquery.malsup.com/corner/ - "Recently I added support for native border-radius rounding in browsers that support it (Opera 10.5+, Firefox, Safari, and Chrome). So in those browsers the plugin simply sets a css property on the element. But in IE, we'll have to wait for version 9 before that is supported. And for all browsers, choosing a pattern other than "round" requires the use of the "div stips" method. "
So rounded corners won't work in IE, but any other corner style will.