时间:2021-07-01 10:21:17 帮助过:49人阅读
css bottom属性怎么用?
作用:bottom 属性规定元素的底部边缘。
说明:该属性定义了定位元素下外边距边界与其包含块下边界之间的偏移。如果 "position" 属性的值为 "static",那么设置 "bottom" 属性不会产生任何效果。
注释:所有主流浏览器都支持 bottom 属性。任何的版本的 Internet Explorer (包括 IE8)都不支持属性值 "inherit"。
css bottom属性使用示例
- <html>
- <head>
- <style type="text/css">
- img.ex1
- {
- position:absolute;
- bottom:0px;
- }
- img.ex2
- {
- position:relative;
- bottom:-100px;
- }
- </style>
- </head>
- <body>
- <img class="ex1" src="https://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg" />
- <h1>This is a heading</h1>
- <img class="ex2" src="https://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg" />
- </body>
- </html>
效果输出:
以上就是css bottom属性怎么用的详细内容,更多请关注Gxl网其它相关文章!