zoukankan      html  css  js  c++  java
  • js艺龙

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>艺龙</title>
        <style type="text/css">
            * {
                margin: 0;
                padding: 0;
            }
            ul {
                list-style: none;
            }
            #box {
                margin: 50px auto;
                 1205px;
            }
            #box li {
                position: relative;
                float: left;
                 200px;
                height: 260px;
                cursor: pointer;
            }
            #box li .shadow {
                position: absolute;
                 100%;
                height: 100%;
                background: rgba(0, 0, 0, .2);
            }
            #box li .text {
                position: absolute;
                left: 0;
                right: 0;
                margin: 30px auto 0;
                 40px;
                font-size: 30px;
                color: #fff;
                text-align: center;
            }
        </style>
    </head>
    <body>
        <ul id="box">
            <li style="background:url(images/1.jpg) center no-repeat;">
                <div class="shadow"></div>
                <div class="text">园林酒店</div>
            </li>
            <li style="background:url(images/2.jpg) center no-repeat;">
                <div class="shadow"></div>
                <div class="text">设计师酒店</div>
            </li>
            <li style="background:url(images/3.jpg) center no-repeat;">
                <div class="shadow"></div>
                <div class="text">青年旅社</div>
            </li>
            <li style="background:url(images/4.jpg) center no-repeat;">
                <div class="shadow"></div>
                <div class="text">特色客栈</div>
            </li>
            <li style="background:url(images/5.jpg) center no-repeat;">
                <div class="shadow"></div>
                <div class="text">海岛酒店</div>
            </li>
            <li style="background:url(images/6.jpg) center no-repeat;">
                <div class="shadow"></div>
                <div class="text">海外温泉</div>
            </li>
        </ul>
        <script src="https://cdn.bootcss.com/jquery/1.12.1/jquery.js"></script>
        <script>
            $('#box li').mouseover(function () {
                $(this).stop(true).animate({
                    400
                }).children().css('display', 'none').end().siblings().stop(true).animate({160}).children().css('display', 'block');
            });
     
            $('#box').mouseout(function () {
                $(this).children().animate({ 200}).children().css('display', 'block');
            });
        </script>
    </body>
    </html>
    

      

    图片更换即可
  • 相关阅读:
    python ping监控
    MongoDB中一些命令
    进制转换(十进制转十六进制 十六进制转十进制)
    通过ssh建立点对点的隧道,实现两个子网通信
    linux环境下的各种后台执行
    python requests请求指定IP的域名
    不需要修改/etc/hosts,curl直接解析ip请求域名
    MongoDB数据update的坑
    windows平台使用Microsoft Visual C++ Compiler for Python 2.7编译python扩展
    rabbitmq问题之HTTP access denied: user 'guest'
  • 原文地址:https://www.cnblogs.com/bgwhite/p/9476315.html
Copyright © 2011-2022 走看看