Is it possible to prescribe the rounding feature without prefixes for the rounded corners of the blocks? that is, write not a set of properties

border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; -khtml-border-radius: 10px; 

and just write

 border-radius: 10px; 

? Is there a problem with display problems in older versions of browsers?

  • one
    you must first write properties with prefixes, then without prefix - modos189
  • thank. otherwise they told me that the properties with prefixes are already superfluous, so I ask that I don’t know how to correctly. - Heidel
  • 2
    Read about SASS - extension of the css language and Compass - a set of plug-in styles that have already been written a hundred times. The pleasure of writing styles is complete. You can write: .rounded {@include border-radius (10px); } - Yura Ivanov


4 answers 4

Properties with prefixes are no longer relevant. You can get by just

 border-radius: 10px; 

In older versions of browsers for which these prefixes are intended, there will naturally be problems, but we look objectively - there are no more browsers left. FF and Safari is very difficult to find those versions for which you need a prefix. Will work in FF / Opera / Safari / Chrome / IE9, as usually IE8 and below come as a party, but the prefixes there still didn’t save :) My opinion is that these prefixes are attachment.

  • Thanks for the explanation!) - Heidel
  • one
    Well, not always, there are cars at work, where last year’s browsers stand, which cannot be updated, but the admin does it once a year, there are also paranoids who are afraid of updating and installing something, or just blondes who don’t understand what an update is so the question is moot. - ЬЬ_
  • I was completely confused ( - Heidel
  • @ B_m_, there's nothing to argue about. What browser versions are we talking about? -moz- - for ff up to version 4 ... -webkit- for chrome / safari versions up to 5 version. These browsers are almost gone. Judging by the statistics of 2 major sites. The share of those browsers is less than 0.1%. In general, here is a visual presentation that will help solve - iKuzko
  • When you see blondes at work behind such browsers and update them to firefox from version 3 to the latest, and their eyes are five rubles in surprise, then you start thinking about this issue. Here is an example of the same VC filter: alpha (opacity = 50); -webkit-border-radius: 2px; -khtml-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; -webkit-transition: opacity 100ms linear; -moz-transition: opacity 100ms linear; -o-transition: opacity 100ms linear; transition: opacity 100ms linear; - ЬЬ_

This is done for cross-browser compatibility. If you don't want to write all the time, just create a class of type .br and assign it to those elements that you want to round corners.

 .text { font-family: /*...*/; color: /*...*/; /*и так далее*/ } .br { /*тут ваш стиль скругленных углов*/ } <p class="text br">Some long text</p> 
  • Here the question is not whether I want to write, but whether it is necessary yet, whether it makes sense. that is, is it still better to write a set of properties with prefixes? - Heidel
  • one
    You need to write properties with prefixes. - Palmervan
  • thank. otherwise they told me that this is already superfluous, so I ask that I do not know how to do it right. - Heidel

There is a script-Prefix-free (and similar), which automatically substitutes the prefixes. Description: second item

  • thanks, I'll take a look. - Heidel

For the donkey IE8, IE7 there are special .htc files that solve these problems.