How to add CSS3 rounded corners with modernizr?

自古美人都是妖i 提交于 2019-12-23 03:29:07

问题


I am trying to add CSS3 based rounded corner support in IE7 and IE8 on following page

Test URL: http://jaspreetkaur.com/postjoint

I have included modernizr library, but it's not working. Is there any code that i need add to make it working in IE?


回答1:


As others have said, Modernizr won't make legacy browsers able to support CSS3. It only checks for support, plus other neat features, such as HTML5shiv, so that you can use HTML5 markup.

To enable CSS3 features in older browsers, you might try CSS3 Pie, but I find it some times creates more problems than it solves. I usually just don't let older browsers see all the fancy stuff, such as rounded corners. It's just a minor design feature, not critical to the overall functionality or layout.

http://css3pie.com/




回答2:


Modernizr only check if the browser is ABLE to support certain features, it will not actually implement the features




回答3:


1. IE8, IE7 do not support CSS3 rounder corners.

2. Mordernizr, is only a script, that enable HTML5 features across different browsers

CSS3 tag for rounder corner is

-webkit-border-radius: 5px; /* for safari */
-moz-border-raidus: 5px; /* for firefox < 4 */
border-radius: 5px; /* for all other that support it */



回答4:


modernizr isn't made to do that really...

if you can, try this http://fetchak.com/ie-css3/



来源:https://stackoverflow.com/questions/9892163/how-to-add-css3-rounded-corners-with-modernizr

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