bottom
属性定义了定位元件的下外边距边界与其包含块下边界之间的偏移。定位元件参考 position 属性。
bottom
的效果取决于元件的 position
属性:
当 position
设置为 absolute
或 fixed
时,bottom
属性指定了定位元件下外边距边界与其包含块下边界之间的偏移。
当 position
设置为 relative
时,bottom
属性指定了元件的下边界离开其正常位置的偏移。
当 top
和 bottom
同时指定时,position
设置为 absolute
/fixed
,并且 height
没有被指定或者指定为 auto
或 100%
的时候,top
和 bottom
都会生效,在其他情况下,如果 height
被限制,则 top
属性会优先设置,bottom
属性则会被忽略。
一个负的、零或正的 <length>
值,它表示:
包含块高度的百分比。
auto
默认值。
初始值 | auto |
适用元素 | 所有元件 |
是否支持继承 | 否 |
是否支持动画 | yes |
百分比 | refer to the height of the containing block |
LCD tables only load in the browser