28 lines
910 B
Markdown
28 lines
910 B
Markdown
---
|
||
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/) |