css - 3px border automatically added when using border-style without specifying border size -


I have noticed that to add a border-style without specifying the size of the boundary, be added to your element in the range Used to be.

HTML:

  & lt; Div class = "box" & gt; & Lt; / Div & gt;   

CSS:

  .box {width: 200px; Height: 300px; Background color: green; Border-style: solid; }   

Expected Result: There is no limit around the box, because we have not specified the width of the boundary.

Actual outcome: A black 3px limit appears almost box.

Ingredient:

I think my question is, why does this happen? Is this a part of W3C CSS specs?

It is important to understand where the qualities come from:

In relation, if it is not unspecified then it comes from the border-color property, which, if not set, each border- * side * -color , which is set Does not return the value to, which is set by the value set for color which is the default for black color.

Color

range - & gt; No color set - & gt; Get the range color - & gt; No color set - & gt; Get from the head border- * side * -color - & gt; No party is set, currentColor

< / p>

The settings for the width take the same route - but prevents the width settings on different side,

width

range -> No width set - & gt; Receive from - & gt; No width set - & gt; In summary, the default value is found in black and medium (default to medium )




Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -