Http://lovervz.spaces.msn.com A key concept in CSS is the box model ). The box model in css2 is the key to typographical positioning in design. Any selection operator complies with the box model specifications, such as <div>, <p>, <A> ...... The box model contains (external patch) margin, (background color) Background-color, (background image) Background-image, (inner patch) padding, (content) content, (Border) border. Is the CSS box model: Plane:3D (source image: hicksdesign) From the outside to the inside of the box:
- Margin margin
- Border border
- Padding gap (also known as Patch)
- Content (content, such as text and images)
The CSS margin attribute (margin) is used to set the distance between the edge of an element's space and adjacent elements. The CSS border attribute (Border) is used to set the edge of an element. The CSS gap attribute (padding) is used to set the distance from the element content to the element border. The CSS background attribute refers to the content and padding areas. The width and height in the CSS attribute indicate the width and height of the content area. |