首页前端开发HTML让某一个div固定在屏幕中的解决方法

让某一个div固定在屏幕中的解决方法

时间2024-01-24 02:43:31发布访客分类HTML浏览1001
导读:收集整理的这篇文章主要介绍了让某一个div固定在屏幕中的解决方法,觉得挺不错的,现在分享给大家,也给大家做个参考。 posITion:fixed; 复制代码代码如下: <htML XMlns="http://www.w3.o...
收集整理的这篇文章主要介绍了让某一个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>

声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!

固定div

若转载请注明出处: 让某一个div固定在屏幕中的解决方法
本文地址: https://pptw.com/jishu/584928.html
div的滚动条如何实现 让横向排列的几个浮动(float:left)的子div居中显示

游客 回复需填写必要信息