<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>有滚蛋条的弹出框剧中</title>
<style>
*{ padding:0px; margin:0px; }
body,html{height:100%; width:100%;}
html{overflow:hidden;}
body{overflow-y:auto }
.display{ 
position:absolute; 
left:50%; top:50%; 
height:300PX; 
width:500PX; 
margin-left:-250PX; 
margin-top:-150PX; 
border:1PX solid #F00;}
</style>
</head>
<body>
<DIV style="height:2000PX;">测试滚动</DIV>
<DIV style="height:2000PX;">测试滚动</DIV>
<DIV style="height:2000PX;">测试滚动</DIV>
<div class="display"></div>
</body>
</html>

 

但要注意的必须声明网页的解析模式,如果用js去实现,在滚动条滚动的时候弹出框会闪

相关文章:

  • 2021-10-14
  • 2022-12-23
  • 2021-06-17
  • 2022-12-23
  • 2021-06-28
  • 2021-12-31
  • 2022-12-23
猜你喜欢
  • 2021-12-19
  • 2022-12-23
  • 2022-03-05
  • 2022-12-23
  • 2022-01-08
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案