网页制作 
首页 > 网页制作 > 浏览文章

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

(编辑:jimmy 日期: 2024/5/31 浏览:3 次 )
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>
上一篇:让横向排列的几个浮动(float:left)的子div居中显示
下一篇:组织结构可以任意拖动到指定位置div
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网