visibility 与 overflow

display@3

Property description: Set or get whether and how the object is displayed

Version change: Yes

Grammar template:

display: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@3 | flex@3 | inline-flex@3

Default value: determined by the element object itself

Property value description:

none:隐藏对象,与visibility属性的hidden值不同,其不为被隐藏的对象保留其物理空间;

inline:指定对象为内联元素;

block:指定对象为块元素;

list-item:指定对象为列表项目;

inline-block:指定对象为内联块元素;

table:指定对象作为块元素级的表格,类同于html标签<table>;

inline-table:指定对象作为内联元素级的表格,类同于html标签<table>;

table-caption:指定对象作为表格标题,类同于html标签<caption>;

table-cell:指定对象作为表格单元格,类同于html标签<td>;

table-row:指定对象作为表格行,类同于html标签<tr>;

table-row-group:指定对象作为表格行组,类同于html标签<tbody>;

table-column:指定对象作为表格列,类同于html标签<col>;

table-column-group:指定对象作为表格列组显示,类同于html标签<colgroup>;

table-header-group:指定对象作为表格标题组,类同于html标签<thead>;

table-footer-group:指定对象作为表格脚注组,类同于html标签<tfoot>;


/***css3中添加的新属性***/
run-in:根据上下文决定对象是内联对象还是块级对象;

flex:将对象作为弹性伸缩盒显示,简称弹性盒子;

inline-flex:将对象作为内联块级弹性伸缩盒显示;

Applicable elements:

Is it inheritable: No

Is it animated: No

Script interface: display

Note: If displayset to none, floatand positionattribute definitions will not take effect, IE6,7only inlineelements can be set to inline-block, and other types of elements are not allowed.







visibility

Property description: Set or get whether to display the object

Version change: No

Grammar template:

visibility:visible | hidden | collapse|none

default value: visibility

Property value description:

visible:设置对象可视,占据空间;

hidden:设置对象隐藏(不可视),占据空间;

collapse:主要用来隐藏表格的行或单元格;

none:不绘制,不可视,不占据空间

**Display:** Indicates whether to draw this element

**Visible:**Whether you want to see it after drawing

Applicable elements: all elements

Is it inheritable: Yes

Is it animated: Yes

Script interface: visibility

**Key point:** Both visible and hidden occupy space, but display:nonedo not occupy space.

Note: Unlike displayattributes, this attribute reserves the physical space it occupies for hidden objects; collapseit has hiddenthe same effect as , but pay attention to distinguishing semantics







overflow

Property description: Set or get the way the object handles overflow content, composite property

Version change: No

Grammar template:

overflow:<overflow-style>
<overflow-style> = visible | hidden | scroll | auto 

default value:

Property value description:

visible:对溢出内容不做处理,内容可能会超出容器;

hidden:隐藏溢出容器的内容且不出现滚动条;

scroll:隐藏溢出容器的内容,溢出的内容将以卷动滚动条的方式呈现;

auto:当内容没有溢出容器时不出现滚动条,当内容溢出容器时出现滚动条,按需出现滚动条,此为body对象和textarea的默认值;

Applicable elements: block container, flexcontainer, gridcontainer

Is it inheritable: No

Is it animated: No

**Script interface: **overflow

Note: For table, the object supports properties with a default value of , if the property table-layoutis set to . If set to , or , then content that exceeds the dimensions will be clipped. If set to , will cause extra text to overflow into cells to the right or left (depending on the property setting)fixedtdhiddenoverflowhiddenscrollautotdvisibledirection


overflow-x

Property description: Set or get the way the object handles horizontal overflow content

Version change: No

Grammar template:

overflow-x:<overflow-style>
<overflow-style> = visible | hidden | scroll | auto 

default value:

Property value description:

visible:对溢出内容不做处理,内容可能会超出容器;

hidden:隐藏溢出容器的内容且不出现滚动条;

scroll:隐藏溢出容器的内容,溢出的内容将以卷动滚动条的方式呈现;

auto:当内容没有溢出容器时不出现滚动条,当内容溢出容器时出现滚动条,按需出现滚动条,此为body对象和textarea的默认值;

Applicable elements: block container, flexcontainer, gridcontainer

Is it inheritable: No

Is it animated: No

**Script interface: **overflowX


overflow-y

Property description: Set or get the way the object handles horizontal overflow content

Version change: No

Grammar template:

overflow-y:<overflow-style>
<overflow-style> = visible | hidden | scroll | auto 

default value:

Property value description:

visible:对溢出内容不做处理,内容可能会超出容器;

hidden:隐藏溢出容器的内容且不出现滚动条;

scroll:隐藏溢出容器的内容,溢出的内容将以卷动滚动条的方式呈现;

auto:当内容没有溢出容器时不出现滚动条,当内容溢出容器时出现滚动条,按需出现滚动条,此为body对象和textarea的默认值;

Applicable elements: block container, flexcontainer, gridcontainer

Is it inheritable: No

Is it animated: No

**Script interface: **overflowY

Guess you like

Origin blog.csdn.net/Sandersonia/article/details/132262222