Which Javascript solution(Not .htc) can really make Antialiased round corner in IE7 and 8?

醉酒当歌 提交于 2019-12-12 20:31:34

问题


Which JavaScript solution (Not .htc) can really make Anti aliased round corner in IE7 and 8 like CSS3 gives in supported browsers?

I tried many

http://www.ruzee.com/blog/ruzeeborders/

http://blue-anvil.com/archives/anti-aliased-rounded-corners-with-jquery/

http://www.curvycorners.net/

All are claiming to give anti aliased corner but giving corners like this

alt text http://shup.com/Shup/375652/11063104941-My-Desktop.png

But no one is giving anti aliased corner. if I need 10px round corner.


回答1:


You can certainly make flexible elements with image round corners.

See this article.

Because CSS3 border-radius is now supported in many of the modern browsers, you could use that as your primary solution and provide a fallback for the ones that don't support it.

On a recent project, I created the website with border-radius and used the jQuery .wrap() for browsers that didn't support it. It looks something like this:

HTML

<div class="round">
    <p>Hi, I'm a paragraph</p>
</div>

CSS

.round {
    border: 1px solid red;
    -moz-border-radius: 10px;
    -webkit-border-radius: 10px;
}

jQuery

if ($.browser.msie) {
    $('.round').wrap('<div class="tl"><div class="tr"><div class="bl"><div class="br"></div></div></div></div>');
}

And you can then style the round corner elements as per the article above.



来源:https://stackoverflow.com/questions/3170402/which-javascript-solutionnot-htc-can-really-make-antialiased-round-corner-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!