美文网首页
2018-05-07 播放器

2018-05-07 播放器

作者: wuliduoduo | 来源:发表于2018-05-07 22:20 被阅读0次
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        body{
            background:url("image/bg2.jpg") no-repeat;
            background-size: cover;
            overflow: hidden;
        }
        ul{
            width: 200px;
            height: 200px;
            position: absolute;
            bottom: 200px; /* 距离底部固定100px */
            left: 50%; /* 配合margin-left 水平居中 */
            margin-left: -100px;
            transform-style: preserve-3d;/* 3d变换 */
            animation: sport 6s linear infinite normal;
        }
        ul li{
            list-style: none;
            width: 200px;
            height: 200px;
            font-size: 32px;
            text-align: center;
            line-height: 200px;
            position: absolute;
            top: 0;
            left: 0;
            background-color:#151515;
        }
        /* 类似六边形 */
        ul li:nth-child(1){
            transform: rotateY(60deg) translateZ(200px);
        }
        ul li:nth-child(2){
            transform: rotateY(120deg) translateZ(200px);
        }
        ul li:nth-child(3){
            transform: rotateY(180deg) translateZ(200px);
        }
        ul li:nth-child(4){
            transform: rotateY(240deg) translateZ(200px);
        }
        ul li:nth-child(5){
            transform: rotateY(300deg) translateZ(200px);
        }
        ul li:nth-child(6){
            transform: rotateY(360deg) translateZ(200px);
        }

        ul li img{
            width: 200px;
            height: 200px;
            border: 5px solid #fff;
            box-sizing: border-box;
            transition: all 0.3s linear;/* 图片变化 */
        }

        ul:hover{
            animation-play-state: paused;
        }
        /* 蒙板 ul li:hover优先于 ul:hover li*/
        ul:hover li img{
            opacity: 0.5;
            width: 200px;
            height: 200px;
        }

        ul li:hover img{
            opacity: 1;
            width: 220px;
            height: 220px;
        }

        .love{
            width: 100px;
            height: 100px;
            position: absolute;
            left: 100px;
            bottom: 100px;
            animation: love 12s linear 0s infinite normal;
        }

        /*照片运动轨迹*/
        @keyframes sport{
            from {transform:rotateX(-10deg) rotateY(0deg);}
            to {transform:rotateX(-10deg) rotateY(360deg);}
        }
        
        /* 爱心运动轨迹 */
        @keyframes love{
            0% {
                left: 100px;
                bottom: 100px;
                opacity: 1;
            }
            20% {
                left: 400px;
                bottom: 500px;
                opacity: 0;
            }
            40% {
                left: 1200px;
                bottom: 800px;
                opacity: 1;
            }
            60% {
                left: 1000px;
                bottom: 500px;
                opacity: 0;
            }
            80% {
                left: 1400px;
                bottom: 400px;
                opacity: 1;
            }
            100% {
                left: 800px;
                bottom: -200px;
                opacity: 0;
            }
        }
    </style>
</head>
<body>
    <ul>
        <li><img src="image/nba1.jpg" alt=""></li>
        <li><img src="image/nba2.jpg" alt=""></li>
        <li><img src="image/cake3.jpg" alt=""></li>
        <li><img src="image/nba4.jpg" alt=""></li>
        <li><img src="image/nba5.jpg" alt=""></li>
        <li><img src="image/rw1.jpg" alt=""></li>
    </ul>
    <img src="image/love.jpg" alt="爱心" class="love">
    <audio src="image/大壮 - 山丘.mp3" autoplay="autoplay" loop="loop"></audio>
</body>
</html>

相关文章

网友评论

      本文标题:2018-05-07 播放器

      本文链接:https://www.haomeiwen.com/subject/hasbrftx.html