zoukankan      html  css  js  c++  java
  • html中气泡头像效果

    <style>
    
            /*头像气泡*/
            .popHead {
                position: relative;
                /*border: 1px solid red;*/
                 14vw;
                height: 33vw;
                overflow: hidden;
                left: 85vw;
                text-align: center;
                /*padding-left: 2.5vw;*/
            }
    
            .popHead .scrollUl li {
                position: absolute;
                display: inline-block;
                top: 100%;
                white-space: nowrap;
                z-index: 100;
                background: rgba(0, 0, 0, 0.5);
                 7vw;
                height: 7vw;
                border-radius: 12vw;
                list-style: none;
                right: 1.5vw;
                opacity: 1;
            }
    </style>
    
    //html
    <body>
    <div class="popHead">
                <ul class="scrollUl">
                    <li><img src="" style="height: 100%;100%;"/></li>
                    <li><img src="" style="height: 100%;100%;"/></li>
                    <li><img src="" style="height: 100%;100%;"/></li>
                    <li><img src="" style="height: 100%;100%;"/></li>
                 
                </ul>
            </div>
    
    </body>
    
    <script>
    var num = 0;
    $(function(){
    
            popHead();//气泡效果
            var popTimer = setInterval(function () {
                num++;
                if (num >= 4) {
                    num = 0;
                }
                popHead();
            }, 1000);
    
    });
    
    
     //头像气泡效果
        function popHead() {
            $('.scrollUl li').eq(num).animate({
                'top': '0',
                'width': '11vw',
                'height': '11vw',
                'opacity': 0
            }, 3000, function () {
                $(this).css({top: '100%',  '7vw', height: '7vw', 'opacity': 1});
            });
        }
    </script>
  • 相关阅读:
    面向对象编程思想(一)
    IT第十九天
    IT第十八天
    关于面试,来自无锡一位尊者的建议
    IT第十一天、第十二天、第十三天
    数据结构 3动态规划
    java 零碎1
    数据结构 2.迭代与递归
    数据结构 1.算法分析
    java 字符串(正则表达式)未完
  • 原文地址:https://www.cnblogs.com/-lin/p/11610917.html
Copyright © 2011-2022 走看看