头闻号

王占峰

综合性公司|PA|PVC

首页 > 新闻中心 > 科技常识:让某一个div固定在屏幕中的解决方法
科技常识:让某一个div固定在屏幕中的解决方法
发布时间:2025-02-05 06:35:00        浏览次数:10        返回列表

今天小编跟大家讲解下有关让某一个div固定在屏幕中的解决方法 ,相信小伙伴们对这个话题应该有所关注吧,小编也收集到了有关让某一个div固定在屏幕中的解决方法 的相关资料,希望小伙伴们看了有所帮助。

position:fixed; 复制代码代码如下: <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <style type="text/css"> #low_right { position: fixed; width: 90px; height: 90px; background: #eee; bottom: 40px; right: 20px; background-color: #DCFCE9; border: 8px double #06F867; text-align: center; padding: 10px; margin: 10px; } </style> </head> <body> <script type="text/javascript"> for (var i = 0; i < 100; i++) { document.write((i + 1) +""); } </script> <div id="low_right"> 右下角 </div> </body> </html>

来源:爱蒂网