Explain how to set the border, background and size of elements in CSS3

ringa_lee
Release: 2017-10-15 10:47:15
Original
2638 people have browsed it

Border

The properties related to the border are as follows.

border-width

is used to set the width of the border. Options include:
1) : change the border width Set to the length value expressed in CSS measurement units (such as em, px, cm);
2) : Set the border width value to the percentage of the width of the border drawing area;
3) Thin, medium and thick: Set the border width to the default width. The specific meaning of these three values ​​​​is defined by the browser. The width represented by the three values ​​​​increases once, and the border The default value for width is medium.

border-style

is used to set the style used to draw the border, which can be any of the following values.
1) none: no border, default value;
2) dashed: dashed border;
3) dotted: Dot line border;
4) groove: groove line border;
5) inset: a border that makes the element content have an inline effect;
6) outset: a border that makes the element content have a convex effect;
7) ridge: ridge border;
8) solid: Solid border.

border-color

Set the color of the border.

Set the border style for a specific side

Top edge
border-top-width
border -top-style
border-top-color
Bottom
border-bottom-width
border-bottom- style
border-bottom-color
left
border-left-width
border-left-style
border-left-color
right
border-right-width
border-right-style
border-right-color
Abbreviation
##border: