问题描述
我试图在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 是。
。相关部分不支持 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中使用圆角的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!