开发者

jQuery corner plugin not working on Internet Explorer

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.开发者_如何学Pythoncorners.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>


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.


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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜