css display属性详解

css display属性在对css做layout设计时非常重要,它的值有以下几种:

 

ValueDescriptionPlay it
inlineDefault value. Displays an element as an inline element (like <span>)Play it »
blockDisplays an element as a block element (like <p>)Play it »
flexDisplays an element as an block-level flex container. New in CSS3 
inline-blockDisplays an element as an inline-level block container. The inside of this block is formatted as block-level box, and the element itself is formatted as an inline-level box 
inline-flexDisplays an element as an inline-level flex container. New in CSS3 
inline-tableThe element is displayed as an inline-level table 
list-itemLet the element behave like a <li> elementPlay it »
run-inDisplays an element as either block or inline, depending on context 
tableLet the element behave like a <table> element 
table-captionLet the element behave like a <caption> element 
table-column-groupLet the element behave like a <colgroup> element 
table-header-groupLet the element behave like a <thead> element 
table-footer-groupLet the element behave like a <tfoot> element 
table-row-groupLet the element behave like a <tbody> element 
table-cellLet the element behave like a <td> element 
table-columnLet the element behave like a <col> element 
table-rowLet the element behave like a <tr> element 
noneThe element will not be displayed at all (has no effect on layout)Play it »
initialSets this property to its default value. Read about initialPlay it »
inheritInherits this property from its parent element. Read about inherit 

转载于:https://www.cnblogs.com/kidsitcn/p/4949661.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值