使用ui-corner-all在IE中使用圆角 [英] Round Corners in IE using ui-corner-all

查看:93
本文介绍了使用ui-corner-all在IE中使用圆角的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在IE7中使用jQuery的ui-corner-all类获得圆角。这是我的网页的样子。

 < html> 
< head>
< script language =javascripttype =text / javascriptsrc =jquery.js>< / script>

< script language =javascripttype =text / javascript>
$(document).ready(function(){
$('#btnSearch')。addClass(ui-corner-all);
});
< / script>
< / head>
< body>
<! - 这里有一些代码 - >
< asp:Button ID =btnSearchText =Searchrunat =serverOnClick =btnSearch_Click/>
<! - 这里有一些代码 - >
< / body>
< / html>

但是,我无法获得圆角的效果。我在这里做错了什么?我也试过包括jQuery的smoothness.css文件,但仍然没有任何工作! -all 是 jQuery UI CSS框架中的CSS类。,它不只是可用的。即使这样......它在IE中也不起作用。 9:)

如果您需要支持IE< 9,您可能需要查看 jQuery Corner插件



你可以看到什么各种IE版本支持这里。相关部分不支持 border-radius 。这个(以及规范之前的自定义mozilla和webkit版本)是 .ui-corner-xxx 类用于获得CSS圆角的原因。


I was trying to get rounded corners in IE7 using jQuery's "ui-corner-all" class. This is how my page looks like.

<html>
<head>
<script language="javascript" type="text/javascript" src="jquery.js"></script>

<script language="javascript" type="text/javascript">
    $(document).ready(function() {
         $('#btnSearch').addClass("ui-corner-all");
    });
</script>
</head>
<body>
<!--some code here-->
<asp:Button ID="btnSearch" Text="Search" runat="server" OnClick="btnSearch_Click" />
<!--some code here-->
</body>
</html>

But, I'm not able to get that effect of rounded corners. Am I doing something wrong here? I also tried including jQuery's smoothness.css file, but still nothing worked!

解决方案

.ui-corner-all is a CSS class in the jQuery UI CSS framework, it's not just available. Even then...it doesn't work in IE < 9 :)

If you need to support IE < 9, you may want to look at the jQuery Corner plugin.

You can see what various IE versions support here. The relevant part is it doesn't support border-radius. This (along with the custom mozilla and webkit versions before the spec) is what the .ui-corner-xxx classes use to get CSS rounded corners.

这篇关于使用ui-corner-all在IE中使用圆角的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆