Tuesday 15 May 2012

CSS Vendor (browser) Prefixes

CSS vendor prefixes or CSS browser prefixes are a way for browser makers to add support for new CSS features in a sort of testing and experimentation period. Browser prefixes are used to add new features that may not be part of a formal specification and to implement features in a specification that hasn’t been finalized.  It is temporary.

The CSS browser prefixes are:
  • Android: -webkit- 
  • Chrome: -webkit- 
  • Firefox: -moz- 
  • Internet Explorer: -ms- 
  • iOS: -webkit- 
  • Opera: -o- 
  • Safari: -webkit-
Example:
Setting a rounded corner on a box:

  • -moz-border-radius: 10px 5px;
  • -webkit-border-top-left-radius: 10px;
  • -webkit-border-top-right-radius: 5px;
  • -webkit-border-bottom-right-radius: 10px;
  • -webkit-border-bottom-left-radius: 5px;
  • border-radius: 10px 5px;

No comments:

Post a Comment