亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

CSS box model overview

Let’s first look at the components of the box including: margin (outer margin); border (border); padding (inner margin); content (content). The innermost part of the text box is the actual content, which directly surrounds the content. is the padding. Padding presents the element's background. The edge of the padding is the border. Outside the border is the margin, which is transparent by default and therefore does not obscure any elements behind it.

Below we will use a picture to describe their structure:

QQ截圖20161011154949.png

Padding, borders and margins are all optional, default The value is zero. However, many elements will be user-generated. You can also use a universal selector to set all elements, which is equivalent to an initialization:

* {
  margin: 0;
  padding: 0;
}

As you can see from the above figure, width (width) and height (height) ) refers to the width and height of the content area. Increasing padding, borders, and margins will not affect the size of the content area, but it will increase the overall size of the element's box.

You can set these attributes as follows:

box {
  width: 70px;
  margin: 10px;
  padding: 5px;
}

The margins can be negative values, and in many cases negative value margins must be used.

Continuing Learning
||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Title</title> </head> <body> PHP中文網(wǎng) </body> </html>
submitReset Code