Declaring CSS class attribute with " - "? -


why attributes declared regularly while others require hyphen?

.box {     width: 500px;     margin: 20px;     border: solid black 5px;     -box-sizing: border-box; } 

while css isn't technically correct, you're seeing vendor-prefixing. vendor prefixing used non-standard-compliant or not implemented specs of w3c recommendation. these apparent in css3 specs browsers still in process of implementing.

some examples box-sizing, transform, transition.

some common prefixes

  1. -moz- firefox/mozilla
  2. -webkit- safari/chrome
  3. -ms- ie/edge
  4. -o- opera
  5. -khtml- konqueror

you may want see mozilla developer network has vendor prefixes.

quote:

browser vendors add prefixes experimental or nonstandard css properties, developers can experiment changes in browser behavior don't break code during standards process. developers should wait include unprefixed property until browser behavior standardized.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -