Fork me on GitHub

【转载】CSS-style-display

HTML { display : sDisplay }
Scripting object.style.display [ = sDisplay ]

 

Possible Values

 

sDisplay String that specifies or receives one of the following values.
block Object is rendered as a block element.
none Object is not rendered.
inline Default. Object is rendered as an inline element sized by the dimensions of the content.
inline-block Object is rendered inline, but the contents of the object are rendered as a block element. Adjacent inline elements are rendered on the same line, space permitting.
list-item Internet Explorer 6 and later. Object is rendered as a block element, and a list-item marker is added.
table-header-group Table header is always displayed before all other rows and row groups, and after any top captions. The header is displayed on each page spanned by a table.
table-footer-group Table footer is always displayed after all other rows and row groups, and before any bottom captions. The footer is displayed on each page spanned by a table.

 

<div line-height: 25px; margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(85, 85, 85); font-family: Arial, Helvetica, simsun, u5b8bu4f53; text-align: left; text-indent: 2em; ">overflow-x:hidden;background:#fff;display:none" id="LrcShower_div">2121</div>

 

______________________________________________________________

display版本:CSS1/CSS2  兼容性:IE4+ NS4+ 继承性:有

语法:

display : block | none | inline | compact | marker | inline-table | list-item | run-in | table | table-caption | table-cell | table-column | table-column-group | table-footer-group | table-header-group | table-row | table-row-group

取值:

block :  CSS1  块对象的默认值。将对象强制作为块对象呈递,为对象之后添加新行

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

inline :  CSS1  内联对象的默认值。将对象强制作为内联对象呈递,从对象中删除行

inline-block :  IE5.5 将对象呈递为内联对象,但是对象的内容作为块对象呈递。旁边的内联对象会被呈递在同一行内

compact :  CSS2 未支持。分配对象为块对象或基于内容之上的内联对象

marker :  CSS2 未支持。指定内容在容器对象之前或之后。要使用此参数,对象必须和 :after 及 :before 伪元素一起使用

inline-table :  CSS2 未支持。将表格显示为无前后换行的内联对象或内联容器

list-item :  CSS2 将块对象指定为列表项目。并可以添加可选项目标志

run-in :  CSS2 未支持。分配对象为块对象或基于内容之上的内联对象

table :  CSS2 未支持。将对象作为块元素级的表格显示

table-caption :  CSS2 未支持。将对象作为表格标题显示

table-cell :  CSS2 未支持。将对象作为表格单元格显示

table-column :  CSS2 未支持。将对象作为表格列显示

table-column-group :  CSS2 未支持。将对象作为表格列组显示

table-header-group :  CSS2 将对象作为表格标题组显示

table-footer-group :  CSS2 将对象作为表格脚注组显示

table-row :  CSS2 未支持。将对象作为表格行显示

table-row-group :  CSS2 未支持。将对象作为表格行组显示

说明:

设置或检索对象是否及如何显示。

对于下列元素来说,此属性的默认值为 block :

ADDRESS QUOTE BODY XMP CENTER COL COLGROUP DD DIR DIV DL DT FIELDSET FORM Hn HR IFRAME LEGEND LISTING MARQUEE MENU OL P PLAINTEXT PRE TABLE TD TH TR UL

对于下列元素来说,此属性的默认值为 none :

BR FRAME nextID TBODY TFOOT THEAD

对于下列元素来说,此属性的默认值为 list-item :

LI

其他元素默认值都是 inline 。

在IE6.0以前的版本中, LI 对象的默认值为 block 。

在IE4.0中, block , inline , list-item 值不被支持。但是对象仍然会被呈递。

在IE5.0中开始支持 block 和 inline 。

在IE5.5中开始支持 inline-block 。你可以使用 inline-block 使对象获得布局而无需指定确切的高( height )和宽( width )。

在IE6.0中开始支持 list-item 。

所有可视的文档对象都是块对象(block element)或者内联对象(inline element)。例如, div 是一个块对象。 span 是一个内联对象。块对象的特征是从新的一行开始且能包含其他块对象和内联对象。内联对象被呈递时不会从新行开始,能够包含其他内联对象和数据。

改变此属性值对其周围内容布局的影响可能是:

在属性值设为 block 的对象后面添加新行。

从属性值设为 inline 的对象中删除一行。

隐藏属性值设为 none 的对象并释放其在文档中的物理空间。

table-header-group 和 table-footer-group 属性值可用来指定当表格( table )跨越了多页时, tHead 和 tFoot 对象的内容在每一页都显示。

此属性对于 currentStyle 对象而言是只读的。对于其他对象而言是可读写的。

对应的脚本特性为display。

posted @ 2012-04-05 19:43  木宛城主  阅读(348)  评论(0编辑  收藏  举报
multifunction lasers
访问人数