Is .htc file good practice in older versions of IE for rounded corners like CSS3?

I am trying to make a simple html button with a circular angle using CSS3, but for IE I use a .htc file for a rounded curve, this is an .htc file using good habit or bad, I can not judge to use this .html.

My other concern is that the progressive extension allows you to use the .htc file or not.

Also tell me if there are any flaws in using the .htc file.

I am new to css3, really appreciate.

+4
source share
2 answers

The disadvantage of these .htc based .htc is that since they paint corners using JavaScript and VML, they are slow (compared to border-radius browsers). However, you will usually notice this only if you use the effect heavily.

Unfortunately, in older versions of IE there is no better method for rounding corners (IE now supports border-radius in version 9):

  • Images are a lot of work (you have to create new images for different radii).
  • Pure JavaScript solutions that do things such as creating multiple div to create angles are an even slower solution.

I would suggest using CSS3PIE to round corners instead. This uses the same .htc / VML method, but this actively updated library does it in the best way. In addition, it provides support for more CSS3 eye candy.

+6
source

No, this is not a good practice, it is a kind of hacking that adversely affects the performance of the code and the page.

.htc force the file browser to artificially draw a round corner using vml.

In this case you should use Progressive Enhancement, read this article http://en.wikipedia.org/wiki/Progressive_enhancement

This term is best practice for all browsers and devices.

0
source

Source: https://habr.com/ru/post/1345695/


All Articles