zoukankan      html  css  js  c++  java
  • 用css制作有滚蛋条的弹出框剧中,在滚动滚动条是不闪

     

    <!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%; 100%;}
    html{overflow:hidden;}
    body{overflow-y:auto }
    .display{ 
    position:absolute; 
    left:50%; top:50%; 
    height:300PX; 
    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去实现,在滚动条滚动的时候弹出框会闪

  • 相关阅读:
    数据快照
    2.21毕设进度
    2.20毕设进度
    Java读取文件,明明文件存在,却报错文件找不到
    2.19毕设进度
    2.18毕设进度
    2.17毕设进度
    2.16毕设进度
    2.15毕设进度
    2.14毕设进度
  • 原文地址:https://www.cnblogs.com/tongchuanxing/p/2598967.html
Copyright © 2011-2022 走看看