How to make rounded border in IE8 with CSS?

前端 未结 5 805
情深已故
情深已故 2020-12-03 18:06

I would like to know how to make rounded border in IE8. I\'m using

-moz-border-radius:4px;
-webkit-border-radius:4px;

for mozilla and safar

5条回答
  •  不知归路
    2020-12-03 18:51

    Download https://code.google.com/p/curved-corner/ and include in your project. Then use the following css to have rounded corner.

    For example:

    .somediv{
       -webkit-border-radius:4px;        /* older webkit based browsers */
       -khtml-border-radius:4px;         /* older khtml based browsers */
       -moz-border-radius:4px;           /* older firefox */
       border-radius:4px;                /* standard */
       behavior: url(border-radius.htc); /* IE 6-8 */
    }
    

    The url to the file is relative to the HTML file which loads the CSS. So this is different to background: url(...) behavior which is relative to the CSS file. More details here

提交回复
热议问题