Learning Code

CSS

CSS3 is a later version of CSS with additional capabilities. Some older versions of browsers do not support CSS3 but enough modern browsers support CSS3 to make it worth using.

CSS3 Prefixes

In some browsers, certain CSS3 properties will display correctly only with a prefix. Chrome and Safari (also recent versions of Opera) need -webkit- and Firefox needs -moz-. Older versions of Opera use -o- and explorer/edge uses -ms-.

selector {-webkit-property: value;
-moz-property: value;
-o-property: value;
-ms-property: value;
property: value;}

Due to the heirarchy of the page, it is a best practice to use the prefixes first, then the property by itself. In most cases the prefix is placed in front of the property, though in certain cases in front of the value. Keep in mind that sometimes the way the value is written changes dependent on the prefix.