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】题9. display的取值 #15

Open
Easay opened this issue Apr 5, 2021 · 1 comment
Open

【CSS】题9. display的取值 #15

Easay opened this issue Apr 5, 2021 · 1 comment
Labels

Comments

@Easay
Copy link
Owner

Easay commented Apr 5, 2021

none | inline | block | list-item | inline-block | table | inline-table | table-caption | table-cell | table-row | table-row-group | table-column | table-column-group | table-footer-group | table-header-group |run-in |box | inline-box | flexbox | inline-flexbox | flex | inline-flex | gird | inline-grid | inherit

none:隐藏对象。与visibility属性的hidden值不同,其不为被隐藏的对象保留其物理空间
inline:指定对象为内联元素。
block:指定对象为块元素。
list-item:指定对象为列表项目。
inline-block:指定对象为内联块元素。(CSS2)
table:指定对象作为块元素级的表格。类同于html标签<table>(CSS2)
inline-table:指定对象作为内联元素级的表格。类同于html标签<table>(CSS2)
table-caption:指定对象作为表格标题。类同于html标签<caption>(CSS2)
table-cell:指定对象作为表格单元格。类同于html标签<td>(CSS2)
table-row:指定对象作为表格行。类同于html标签<tr>(CSS2)
table-row-group:指定对象作为表格行组。类同于html标签<tbody>(CSS2)
table-column:指定对象作为表格列。类同于html标签<col>(CSS2)
table-column-group:指定对象作为表格列组显示。类同于html标签<colgroup>(CSS2)
table-header-group:指定对象作为表格标题组。类同于html标签<thead>(CSS2)
table-footer-group:指定对象作为表格脚注组。类同于html标签<tfoot>(CSS2)
run-in:根据上下文决定对象是内联对象还是块级对象。(CSS3)
box:将对象作为弹性伸缩盒显示。(伸缩盒最老版本)(CSS3)
inline-box:将对象作为内联块级弹性伸缩盒显示。(伸缩盒最老版本)(CSS3)
flexbox:将对象作为弹性伸缩盒显示。(伸缩盒过渡版本)(CSS3)
inline-flexbox:将对象作为内联块级弹性伸缩盒显示。(伸缩盒过渡版本)(CSS3)
flex:将对象作为弹性伸缩盒显示。(伸缩盒最新版本)(CSS3)
inline-flex:将对象作为内联块级弹性伸缩盒显示。(伸缩盒最新版本)(CSS3)
grid:将网页划分成一个个网格,可以任意组合不同的网格,做出各种各样的布局(CSS3)

@Easay Easay added the CSS label Apr 5, 2021
@Easay Easay changed the title 【CSS】题10. display的取值 【CSS】题9. display的取值 Apr 5, 2021
@cheny88
Copy link

cheny88 commented Apr 2, 2022

关于opacity:0、visibility:hidden、display:none三个属性的比较:
分别为这三个盒子注册点击事件
透明度是0:看不见,摸得着;还存在于页面中,并且点击能正常触发点击事件,只是我们看不到;触发重绘
visibility:hidden:还存在于页面中,但是绑定点击事件,并不能触发;触发重绘
display:nono:消失在页面中了,更无法触发点击事件;触发重排

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

No branches or pull requests

2 participants