0
点赞
收藏
分享

微信扫一扫

day14 Python css positon学习 之 fixed

非凡兔 2022-08-02 阅读 61

<div style="height: 1200px;background-color: red"></div>

<!-- 这样会放在顶部-->
<div style="position: fixed;top:0">返回顶部</div>




<div style="height: 1200px;background-color: red"></div>
<!-- 这样会放在底部,默认都是从左开始的-->
<div style="position: fixed;bottom:0">返回顶部</div>

永远相对于整个窗口是固定的。

举报

相关推荐

0 条评论