css bottom属性用于规定元素的底部边缘,该属性定义了定位元素下外边距边界与其包含块下边界之间的偏移。如果 "position" 属性的值为 "static",那么设置 "bottom" 属性不会产生任何效果。
css bottom属性怎么用?
作用:bottom 属性规定元素的底部边缘。
说明:该属性定义了定位元素下外边距边界与其包含块下边界之间的偏移。如果 "position" 属性的值为 "static",那么设置 "bottom" 属性不会产生任何效果。
注释:所有主流浏览器都支持 bottom 属性。任何的版本的 Internet Explorer (包括 IE8)都不支持属性值 "inherit"。
css bottom属性使用示例
img.ex1
{
position:absolute;
bottom:0px;
}
img.ex2
{
position:relative;
bottom:-100px;
}
This is a heading
效果输出: