文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>css中display的属性...

css中display的属性...

时间:2010-08-09  来源:yangautumn43

display

« CSS « CSS Reference

Summary

The display CSS property specifies the type of rendering box used for an element. In HTML, default display property values are taken from behaviors described in the HTML specifications or from the browser/user default stylesheet. The default value in XML is inline.

In addition to the many different display box types, the value none allows the display of an element to be turned off; all child elements also have their display turned off. The document is rendered as though the element did not exist in the document tree.

  • Initial value : inline
  • Applies to: all elements
  • Inherited : no
  • Media: visual
  • Computed value : as specified, except for root element, floated elements, and absolutely positioned elements

Syntax

display:  <display-value> | 

inherit

Values

<display-value> can be any of the following values:

noneTurns off the display of an element (it has no effect on layout); all child elements also have their display turned off. The document is rendered as though the element did not exist. 
To render an element box's dimensions, yet have its contents be invisible, see the visibility property.inlineThe element generates one or more inline element boxes.blockThe element generates a block element box.inline-block Requires Gecko 1.9Introduced in CSS 2.1. The element generates a block element box that will be flowed with surrounding content as if it were a single inline box (behaving much like a replaced element would).list-itemThe element generates a block box for the content and a separate list-item inline box.compact(Unsupported, dropped from the CSS 2.1 standard)run-inUnimplemented in Gecko/Firefox, bug 2056.
  1. If the run-in box contains a block box, same as block.
  2. If a block box follows the run-in box, the run-in box becomes the first inline box of the block box.
  3. If a inline box follows, the run-in box becomes a block box.
tableBehaves like the <table> HTML element.inline-table New in Firefox 3The inline-table value does not have a direct mapping in HTML.table-captionBehaves like the <caption> HTML element.table-column | table-column-groupThese elements behave like the corresponding <col> and <colgroup> HTML elements.table-header-group | table-row-group | table-footer-groupThese elements behave like the corresponding <thead> | <tbody> | <tfoot> HTML elements.table-rowBehaves like the <tr> HTML element.table-cellBehaves like the <td> HTML element.摘自:https://developer.mozilla.org/en/CSS/display
相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载