Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css] 第86天 display有哪些值?分别说明他们的作用是什么? #597

Open
haizhilin2013 opened this issue Jul 10, 2019 · 9 comments
Labels
css css

Comments

@haizhilin2013
Copy link
Collaborator

第86天 display有哪些值?分别说明他们的作用是什么?

@haizhilin2013 haizhilin2013 added the css css label Jul 10, 2019
@dondonZh
Copy link

block
none
inline-block
initial
table
inline
flex
自己能打出来的只有这些

@xjt31012
Copy link

display:block/inline-block 给元素转块/转行内块
display:inline 把元素转成内联元素(我很少用到)
display:none让元素消失,不显示
display:flex弹性布局
我常用的就是这些

@pokerLife
Copy link

你们居然忘记 css grid 网格布局

 display:grid;

@haizhilin2013
Copy link
Collaborator Author

@pokerLife 这提示很是及时

@quitone
Copy link

quitone commented Jul 11, 2019

block
inline-block
inline
table
table-cell
flex
inline-flex
grid
inline-grid

@xiangshuo1992
Copy link
Contributor

MDN,真香
元素盒模型分为 外部显示模型内部显示模型

/* <display-outside> values */
display: block;
display: inline;
display: run-in;

/* <display-inside> values */
display: flow;
display: flow-root;
display: table;
display: flex;
display: grid;
display: ruby;

/* <display-outside> plus <display-inside> values */
display: block flow;
display: inline table;
display: flex run-in;

/* <display-listitem> values */
display: list-item;
display: list-item block;
display: list-item inline;
display: list-item flow;
display: list-item flow-root;
display: list-item block flow;
display: list-item block flow-root;
display: flow list-item block;

/* <display-internal> values */
display: table-row-group;
display: table-header-group;
display: table-footer-group;
display: table-row;
display: table-cell;
display: table-column-group;
display: table-column;
display: table-caption;
display: ruby-base;
display: ruby-text;
display: ruby-base-container;
display: ruby-text-container;

/* <display-box> values */
display: contents;
display: none;

/* <display-legacy> values */
display: inline-block;
display: inline-table;
display: inline-flex;
display: inline-grid;

/* Global values */
display: inherit;
display: initial;
display: unset;

@nowherebutup
Copy link

nowherebutup commented Jul 11, 2019

block
inline-block
inline
flex
table
none

table-cell
grid
inline-flex

@smile-2008
Copy link

display:block/inline-block 给元素转块/转行内块
display:inline 把元素转成内联元素(我很少用到)
display:none让元素消失,不显示
display:flex弹性布局
我常用的就是这些

@zxcdsaqwe123
Copy link

flex block inline inline-block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css css
Projects
None yet
Development

No branches or pull requests

9 participants