zoukankan      html  css  js  c++  java
  • 入口图片放在浏览器正中间,点击之后缩小固定在浏览器一侧

    +

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
            "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
        <title></title>
    
    </head>
    <body>
    
    <!--大会了解提示-->
    <div class="xia_box">
        <div align="center" class="xia_nr">
            <div class="xia_img">
                <a href="http://jsbr.org.cn/tuantifudaoluntan/">
                    <img src="../../images/xia_ts.jpg" alt="">  <!--大图:页面刷新一进来 -->
                    <a class="z_a1 z_a"  href="http://jsbr.org.cn/tuantifudaoluntan/">查看详情</a>
                    <a class="z_a2 z_a"  href="http://p.qiao.baidu.com/im/index?siteid=7886751&ucid=2436607&cp=&cr=&cw=&qq-pf-to=pcqq.c2c">立即报名</a>
                </a>
                <img class="xia_close" src="../../images/xia_close.png" alt="">  <!--右上角小叉号-->
            </div>
            <style>
                .xia_img{
                    position: relative;
                }
                .z_a{
                    display: inline-block;
                    width: 90px;
                    height: 30px;
                    line-height: 30px;
                    text-align: center;
                    color: #f3e309!important;
                    background: #202b7a;
                }
                .z_a1{
                    position: absolute;
                    left: 200px;
                    bottom: 20px;
                }
                .z_a2{
                    position: absolute;
                    right: 200px;
                    bottom: 20px;
                }
            </style>
        </div>
    </div>
    <style>
        .xia_imgshow>a{
            position: relative;
            display: block;
        }
        .z_b{
            display: inline-block;
            width: 90px;
            height: 30px;
            line-height: 30px;
            text-align: center;
            color: #f3e309!important;
            background: #202b7a;
        }
        .z_b1{
            position: absolute;
            left: 17px;
            bottom: 82px;
        }
        .z_b2{
            position: absolute;
            left: 17px;
            bottom: 72px;
        }
        .xia_box{
            position: fixed;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            display: none;
            z-index:9999
    
        }
        .xia_nr{
            left: 0;
            right: 0;
            margin:0 auto;
            width: 620px;
        }
        .xia_img{position: relative;}
        .xia_img img.xia_close{
            position: absolute;
            right: 11px;
            top: 7px;
            cursor: pointer;
        }
        .xia_imgshow{
            position: fixed;
            bottom:50px;
            left:0;
            display: none;
            z-index:9999
        }
    </style>
    <div class="xia_imgshow">
        <a href="http://xinlicujinhui.com/tuantifudaoluntan/">
            <img src="../../images/xia_hide.jpg" alt="">  <!-- 点击大图后,悬在浏览器左侧 -->
            <a class="z_b1 z_b"  href="http://jsbr.org.cn/tuantifudaoluntan/">查看详情</a>
            <a class="z_b2 z_b"  href="http://p.qiao.baidu.com/im/index?siteid=7886751&ucid=2436607&cp=&cr=&cw=&qq-pf-to=pcqq.c2c">立即报名</a>
        </a>
    </div>
    
    <script>
        setTimeout(function(){
            $('.xia_box').css('display','block')
            $(window).resize(function(){
                $('.xia_nr').css({
                    position:'absolute',
                    top: ($(window).height() - $('.xia_nr').outerHeight())/2
                });
            });
            // 最初运行函数
            $(window).resize();
            $('img.xia_close').click(function(){
                $('.xia_box').css('display','none')
                $('.xia_imgshow').css('display','block')
            });
        },500);
    </script>
    <!--大会了解提示-->
    </body>
    </html>
  • 相关阅读:
    Unity 检查文件命名是否规范
    比特 bit 字节 byte ASCII码 Unicode UTF 32 UTF 8 傻傻分不清楚
    LuaJIT诡异bug(疑似)
    [转]现代密码学实践指南
    [转]安卓系统下luajit性能问题
    [转]用好lua+unity,让性能飞起来——luajit集成篇/平台相关篇
    lua string.format的bug(已知存在于lua5.1.5、LuaJIT-2.0.4)
    编译libmysqlclient.a静态库
    linux模拟复杂网络环境下的传输
    mingw & vs 兼容
  • 原文地址:https://www.cnblogs.com/wolflower/p/7612536.html
Copyright © 2011-2022 走看看