Let IE also support rounded corners

Source: Internet
Author: User

1. First to download a compressed package, there is a Microsoft Script file (11KB), in which IE uses the VML Vector Markup language as a brush to draw a fillet.

: Baidu Network Disk download

How to use:

.main{border2pxsolid#C0C0C0;-moz-border-radius: 10px;-webkit-border-radius: 10px; border-radius: 10px;position:relative;z-index:2;behavior: url(此处为ie-css3.htc文件的绝对路径);

Browser support for WebKit kernel "-webkit-border-radius:10px;" Properties (10px is the radius of the fillet), you can directly parse out the fillet; Firefox browser supports "-moz-border-radius:10px;" attribute, can also directly parse out the fillet, ie Department browser need to add "border-radius:10px;" 's Properties.

The following points need to be noted:

1, behavior the URL must fill in the absolute path of IE-CSS3.HTC, because IE browser to find the file is relative to the current HTML file path to find.

2, must have the positioning attribute: position:relative;

3, because in the IE browser these CSS3 effect implementation is to rely on VML, by the VML to draw the fillet or the projection effect, so also need a Z-index property. The Z-index property is best set to be larger, such as 2.

4, if some modules in IE browser cannot use this rendering, you can try to absolutely locate the corresponding layer, that is, add "width:400px;" height:400px; " Property.

PS: Because this method uses script to implement, the actual application process may have a lot of unexpected problems, so in the formal business projects are still cautious use of good.

Let IE also support rounded corners

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.