Files
2018-10-16 21:32:40 +05:30

41 lines
770 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Adjust the Margin of an Element
localeTitle: 调整元素的边距
---
## 调整元素的边距
调整`Element``Margin`意味着增加或减少元素边框与周围元素之间的间距。
•以像素为单位( `px` )以正整数和负整数调整边距。
•可以从所有方向(顶部,底部,左侧,右侧)创建边距。
这是它如何编写的一个例子:
```css
margin: 20px;
```
您可以通过更改数值轻松更改或调整`Element``Margin`
**之前**
保证金: `20` px;
**之后**
保证金: `50` px;
您还可以创建一个具有您将重复使用的`margin`的自定义`class`
```css
.style-margin {
margin: 20px;
}
```
```html
<h2 class="style-margin">Example</h2>
```