The CSS positioning properties allows you to position an element.
使用CSS定位属性可以让你定义元素的位置如何让一元素相对于原始位置进行相对定位 Position:relativeThis example demonstrates how to position an element relative to its normal position.
Examples 实例:
Source Code to Run
[www.21shipin.com] 如何使用绝对值来定位元素 Position:absoluteThis example demonstrates how to position an element using an absolute value.
Examples 实例:
Source Code to Run
[www.21shipin.com] 何如设置元素的外形,并以这个外形显示 Set the shape of an elementThis example demonstrates how to set the shape of an element. The element is clipped into this shape, and displayed.
Examples 实例:
Source Code to Run
[www.21shipin.com] Overflow
当元素的内容超过了指定的范围,overflow属性就可以指定应该以怎样的形式来处理This example demonstrates how to set the overflow property to specify what should happen when an element's content is too big to fit in a specified area.
Examples 实例:
Source Code to Run
[www.21shipin.com] 如何垂直对齐一张图片 Vertical align an imageThis example demonstrates how to vertical align an image in a text.
Examples 实例:
Source Code to Run
[www.21shipin.com] Z-index
Z-index可以让一元素放到另一元素的\"后面\"Z-index can be used to place an element \"behind\" another element.
Examples 实例:
Source Code to Run
[www.21shipin.com] Z-index
上面例子中的元素现在Z-index值已经发生的变化The elements in the example above have now changed their Z-index.
Examples 实例:
Source Code to Run
[www.21shipin.com] The CSS positioning properties allow you to specify the left, right, top, and bottom position of an element. It also allows you to set the shape of an element, place an element behind another, and to specify what should happen when an element's content is too big to fit in a specified area.
CSS定位属性答应你指定元素上下左右的位置。也答应你设置元素的外形,将元素安置在另一个元素的后面,并指定当元素内容超出范围后应该怎么做。