js弹出两个div层,高度的问题,恳求求大神指导

qingwadaxia_1 2017-06-14 07:49:02
js定时弹出两个div层 但是最下面那个会遮挡一部分,需要下拉才能看 ,如图:



要怎样才能让它弹出的时候,让下面那个div展现完全,如下图, 而不需要往下拉才可以看到




...全文
181 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
cn00439805 2017-06-15
  • 打赏
  • 举报
回复
你试过了没,别用你自己的页面,用你发的另存为
qingwadaxia_1 2017-06-15
  • 打赏
  • 举报
回复
引用 5 楼 cn00439805 的回复:
你把他保存成一份html,看看能不能跑,反正我这跑不了,不信你试试
可以的啊 在谷歌浏览器 手机模拟看下就好了
cn00439805 2017-06-15
  • 打赏
  • 举报
回复
你把他保存成一份html,看看能不能跑,反正我这跑不了,不信你试试
qingwadaxia_1 2017-06-15
  • 打赏
  • 举报
回复
引用 3 楼 cn00439805 的回复:
你贴出的代码要自己能跑起来,别人才能轻松帮你改。建议你url都用线上路径。
这个可以跑的 就是简单样式 没关系的
cn00439805 2017-06-15
  • 打赏
  • 举报
回复
你贴出的代码要自己能跑起来,别人才能轻松帮你改。建议你url都用线上路径。
qingwadaxia_1 2017-06-15
  • 打赏
  • 举报
回复
没人回答吗 ?
qingwadaxia_1 2017-06-14
  • 打赏
  • 举报
回复
我的代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no"/>
<meta http-equiv="pragma" content="no-cache" />
<title></title>
<base target="_blank">
<link href="css/phonecommon.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/jquery.min.js"></script>
</head>
 
<body>
<header>
    <div class="top">
        <h2><a href="javascript:void(0)" onclick="LR_HideInvite();openZoosUrl();return false;"><img src="picture/top_ico2n2.png"></a></h2>
        <h3><a href="/"><img src="picture/top_ico32n1.png"></a></h3>
    </div>
    <div class="img"><a href="javascript:void(0)" onclick="LR_HideInvite();openZoosUrl();return false;"><img src="picture/log23o.jpg"></a></div>
    <div  style="height:1em;"></div>
</header>
<article>
    <section>
        <div class="wp01">
            <dl>
                <dt><a href="javascript:void(0)" onclick="LR_HideInvite();openZoosUrl();return false;"><img src="picture/zj_pic122.jpg"></a></dt>
                <dd> <a href="javascript:void(0)" onclick="LR_HideInvite();openZoosUrl();return false;">
                    <h2><span>XXX</span>xxx</h2>
                    <h3><img src="picture/zj_ico2n1.png">xxxxxxxx</h3>
                    <h3><img src="picture/zj_icon21.png">xxxxxxxx</h3>
                    <p><strong>xx</strong>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
                    </a> </dd>
            </dl>
        </div>
    </section>
    <section>
        <div class="wp02">           
            <div id="bx1" style="display:none;">
                <dl>
                    <dt><a href="javascript:void(0)" onclick="LR_HideInvite();openZoosUrl();return false;"><img src="picture/x_43zj.jpg"></a></dt>
                    <dd><a href="javascript:void(0)" onclick="LR_HideInvite();openZoosUrl();return false;"></a></dd>                    
                </dl>
            </div>
            <div id="bx2" style="display:none;margin-bottom:8em;">
                <dl>
                    <dt><a href="javascript:void(0)" onclick="LR_HideInvite();openZoosUrl();return false;"><img src="picture/x_z2231j.jpg"></a></dt>
                    <dd><a href="javascript:void(0)" onclick="LR_HideInvite();openZoosUrl();return false;">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</a></dd>
                </dl>
            </div>
            <!--<a href="javascript:void(0)" onclick="LR_HideInvite();openZoosUrl();return false;" style="width:30rem; height:6.5rem; display:block; "></a>-->
        </div>
        <script>
            var bx1 = document.getElementById('bx1');
            var bx2 = document.getElementById('bx2');       
            setTimeout(function() {       
            bx1.style.display = 'block'},1000);
            setTimeout(function() {   
            bx2.style.display = 'block'},2000);
        </script> 
    </section>
    <div style="clear:both;height:2em;"></div>
    <section>
        <div class="wp03">
            <h3><a href="javascript:void(0)" onclick="LR_HideInvite();openZoosUrl();return false;"><img src="picture/send.png"></a></h3>
            <ul>
                <li><a href="javascript:void(0)"><img src="picture/wp3_icon21.png">xxxxxx</a></li>
                <li><a href="javascript:void(0)"><img src="picture/wp3_icon22.png">xxxxxx</a></li>
                <li><a href="tel:0830-6021000"><img src="picture/wp3_ic2on3.png">xxxxxx</a></li>
            </ul>
        </div>
    </section>
</article>
<script>
function GetQueryString($name){
    var $index=document.referrer.indexOf($name+"="),$e='';
    if($index>1){
        $e=document.referrer.substring($index+$name.length+1);
        if(($index=$e.indexOf("&"))>0){
            $e=$e.substring(0,$index);
        }
    }
    return $e;
}
// 调用方法
var $wd=GetQueryString("wd");
if($wd&&$wd.length>0){}else{$wd=GetQueryString("word")}
 
if($wd&&$wd.length>0){
    $wd=decodeURIComponent($wd);
    $line='xxx,xxx【"<b>'+$wd+'</b>"】xxxxxxxxxxxx<span class="ly-animation-bell on">xxxxxxxxxxxx!</span>xxxxxxxxxxxxxxx?';
}else{
    $line='xxx,xxx<span class="ly-animation-bell on">xxx!</span>xxxxxxxxxxxxxxxxxx';
}
 
$('.wp02 #bx1 dd a').html($line);
 
</script>
   
 
 
 
</body>
</html>

87,989

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧