IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    jQuery+CSS3模拟WIN8卡片式UI效果

    天外飞仙发表于 2015-10-01 06:12:20
    love 0

    jQuery+CSS3模拟WIN8卡片式UI效果
    20150927101208
    部分js代码

    $(document).ready(function() {
        //slidedown Effect
        $('.slidedown').hover(function() {
            $('.search').show();
            $(this).children().animate({
                top: '30'
            },
            {
                queue: false,
                duration: 500
            });
        },
        function() {
            $(this).children().animate({
                top: '0'
            },
            {
                queue: false,
                duration: 500
            });
            $('.search').hide();
        });
        //slideleft Effect
        $('.slideleft').hover(function() {
            $(this).children().animate({
                left: '-150'
            },
            {
                queue: false,
                duration: 160
            });
            $('.news').show();
        },
        function() {
            $(this).children().animate({
                left: '0'
            },
            {
                queue: false,
                duration: 160
            });
            $('.news').hide();
        });
        //slideright Effect
        $('.slideright').hover(function() {
            $(this).children().animate({
                left: '140'
            },
            {
                queue: false,
                duration: 160
            });
            $('.news2').show();
        },
        function() {
            $(this).children().animate({
                left: '0'
            },
            {
                queue: false,
                duration: 160
            });
            $('.news2').hide();
        });
    
        //startMenu Effect
        $('#start').toggle(function() {
            $(this).addClass('click');
            $('#startMenu').slideDown(110);
            $('.container').addClass('small');
        },
        function() {
            $(this).removeClass('click');
            $('#startMenu').slideUp(110);
            $('.container').removeClass('small');
        });
    
    });
    
    $(document).ready(function() {
        //Partial Sliding (Only show some of background)
        $('.boxgrid.peek').hover(function() {
            $(".cover", this).stop().animate({
                top: '90px'
            },
            {
                queue: false,
                duration: 160
            });
        },
        function() {
            $(".cover", this).stop().animate({
                top: '0px'
            },
            {
                queue: false,
                duration: 160
            });
        });
    
    });
    

    下载地址
    预览地址



沪ICP备19023445号-2号
友情链接