Reputation: 5730
I am new to HTML5 and CSS3. I was just seeing some CSS3 code which is as below:
.box
{
border-top-left-radius:5px;
-webkit-border-bottom-left-radius:5px;
-moz-border-top-left-radius:5px;
border:1px solid #8e8e8e;
background-color:white;
height:16px;
padding:4px;
padding-left:28px;
padding-right:10px;
color:#4a4a4a;
float:left;
}
I couldn't get why after border-top-left-radius
border radius is mentioned with -moz and -webkit prefixes? Is syntax for different browsers different? Is it now being standardized?
Upvotes: 2
Views: 171
Reputation: 723688
Yes, the syntax can be different with experimental properties. This is entirely up to a vendor to decide, because a vendor-prefixed property is considered proprietary and not part of the standard.
In particular, Mozilla called it -moz-border-radius-topleft
, not -moz-border-top-left-radius
. The code you're looking at is mistaken (possibly a result of blind copying and pasting of declarations).
It has since been standardized to border-top-left-radius
. The prefixed properties are only there to support older versions of browsers. For that matter, the unprefixed property should come last in order to ensure a browser's best/most stable implementation of a property.
Upvotes: 8
Reputation: 10378
To clarify what BoltClock said: The browser creators Microsoft, Google, Mozilla and such decide which parts of HTML and css to implement in their browsers. Most of the companies want people to use their brand of browser, because this means they can give a better experiance or direct you to their own propriety sites, Thus extra features such as new CSS-tags or other useful developer tools has been developed trying to get an edge on other browser-vendors.
This has been going on for a long time ever since the first browser was launched in the 1990:s. Netscape provided their own features and Microsoft came late into the game and had a hard time getting up to speed. In those times it was not certain that browsers would be free and so much effort went into making the best browser, and different features arose. Later when W3C came into the picture and started the work of standardizing the web vendors slowly but surely started to adhere to standards. That work is still in process and will most likely need to continue for quite some time.
There is a brilliant course on coursera that touches this subject. Check it out!
Upvotes: 2