Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use css outer margin margin

Shulou Source: shulou.com Published: 2022-05-31 17:43:55 11月17日 Update

This article mainly introduces the relevant knowledge of "how to use css external margin margin". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "how to use css external margin margin" can help you solve the problem.

instructions

1. Used to increase the distance between elements, the outer margin is the same as the border, which is divided into top, right, bottom and left margins.

2. Margin can be added in four different directions (top,right,bottom,left), so it is important to clarify some basic concepts before delving into examples and use cases.

Example

Div {width: 200pxX height: 200px;} .box1 {background: red;margin-bottom: 20pxTracer Margaret bottom: 20px 50pxX margin margin: auto;//margin-top:-100px;} .box2 {background: blue;} this is the end of "how to use css margin margin". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Tags: Knowledge different direction industry practical important usage instructions elements content examples practicality practice articles methods more cases concepts knowledge points examples articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Microsoft Apple Linux vpn