开发者

Round Corners in IE using ui-corner-all

开发者 https://www.devze.com 2023-01-11 02:44 出处:网络
I was trying to get rounded corners in IE7 using jQuery\'s \"ui-corner-all\" class. This is how my page looks like.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消