哪个Javascript解决方案(不.htc)可以真正使抗锯齿圆角在IE7和8? [英] Which Javascript solution(Not .htc) can really make Antialiased round corner in IE7 and 8?

查看:142
本文介绍了哪个Javascript解决方案(不.htc)可以真正使抗锯齿圆角在IE7和8?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

哪个JavaScript解决方案(不 .htc )可以真正使IE7和8中的抗锯齿圆角如 CSS3



我尝试过许多





由于CSS3 border-radius现在在许多现代浏览器中都支持,因此您可以使用它作为主要解决方案,并提供



在最近的一个项目中,我使用border-radius创建了一个网站,并使用jQuery .wrap()作为浏览器不支持它。它看起来像这样:



HTML

 < div class =round> 
< p>我是一个段落< / 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>< ');
}

然后你可以根据上面的文章来设置圆角元素的样式。 / p>

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

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

解决方案

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.

这篇关于哪个Javascript解决方案(不.htc)可以真正使抗锯齿圆角在IE7和8?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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