How to set the border color for div in bootstrap?
How to set the border:
1.
border:1px solid red;
2.
border-width:1px;边框的粗细 border-style: solid;边框的风格 border-color: red;边框的颜色
3.
border-left:1px solid red; border-right:1px solid blue; border-top:1px solid green; border-bottom:1px dotted grey;
Related recommendations: "bootstrap Getting Started Tutorial"
Line/border style:
none: no style; dotted : dotted line; dashed: dotted line; solid: solid line;
double: double line; groove: groove line; ridge: ridge line; inset: concave; outset: convex
div{padding:20px;width:10px;background:red;color:#fff}
(The difference between padding and margin: when the box has no width and height, padding can be superimposed on the width and height of the box, but margin cannot, unless the box has content)
The true width of the box = its own width, left margin, right margin Left border, right border;
The real height of the box = its own height, top margin, bottom margin, top border, bottom border;
For example:
The above is the detailed content of How to set border color to div in bootstrap. For more information, please follow other related articles on the PHP Chinese website!