How to set border color to div in bootstrap

爱喝马黛茶的安东尼
Release: 2019-07-17 13:45:10
Original
9379 people have browsed it

How to set border color to div in bootstrap

How to set the border color for div in bootstrap?

How to set the border:

1.

border:1px solid red;
Copy after login

2.

border-width:1px;边框的粗细 border-style: solid;边框的风格 border-color: red;边框的颜色
Copy after login

3.

border-left:1px solid red; border-right:1px solid blue; border-top:1px solid green; border-bottom:1px dotted grey;
Copy after login

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}
Copy after login

(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:

Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!