freeCodeCamp/guide/chinese/css/properties/display-property/index.md

28 lines
910 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Display Property
localeTitle: 显示属性
---
## 显示属性
display属性指定用于HTML元素的框的类型。它有20个可能的关键字值。常用的是
```css
.none {display: none;}
.block {display: block;}
.inline-block {display: inline-block;}
.inline {display: inline;}
.flex {display: flex;}
.inline-flex {display: inline-flex;}
.inline-table {display: inline-table;}
.table {display: table;}
.inherit {display: inherit;}
.initial {display: initial;}
```
#### 更多信息:
文档和关键字值的完整列表: [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/display)
浏览器支持: [caniuse](http://caniuse.com/#search=display)
Flexbox完整指南 [css-tricks](https://css-tricks.com/snippets/css/a-guide-to-flexbox/)