Introduction to border-radius IE8 compatible processing method

高洛峰
Release: 2017-03-24 09:40:45
Original
2793 people have browsed it

According to canisue (http://caniuse.com/#search=border-radius), border-radius compatibility is shown in the figure below:

border-radius IE8兼容处理方法介绍

Test code:

<!DOCTYPE html>
<html>

    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title></title>
        <style type="text/css">
            * {
                margin: 0;
                padding: 0;
            }
            
            #header {
                width: 400px;
                height: 400px;
                margin: 10px;
                border-radius: 10px;
                border: 1px solid red;
            }
        </style>
    </head>

    <body>
        <div id="header">
        </div>
    </body>

</html>
Copy after login

IE8 browser effect:

border-radius IE8兼容处理方法介绍

#border-radius compatible solution in IE8 browser:

<!DOCTYPE html>
<html>

    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title></title>
        <style type="text/css">
            * {
                margin: 0;
                padding: 0;
            }
            
            #header {
                width: 400px;
                height: 400px;
                margin: 10px;
                border-radius: 10px;
                border: 1px solid red;
                /*关键属性设置 需要把路径设置好*/
                behavior: url(PIE.htc);
            }
        </style>
    </head>

    <body>
        <div id="header">
        </div>
    </body>

</html>
Copy after login

Effect under IE8 browser:

border-radius IE8兼容处理方法介绍

PIE.HTC download address: http://css3pie.com/

PIE can handle some properties of CSS3, such as :

border-radius IE8兼容处理方法介绍

The above is the detailed content of Introduction to border-radius IE8 compatible processing method. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!