<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> #back{ width: 80px; height: 80px; background-color: red; text-align: center; line-height: 80px; position: fixed; bottom: 50px; right: 30px; z-index: 1000;/*数值越大越先显示*/ } </style> <title>固定定位</title> </head> <body> <div style="height: 1000px"> <div id="back"> 返回顶部 </div> </div> </body> </html>
元素的固定定位
最新推荐文章于 2022-08-04 20:44:29 发布