鼠标移入盒子多角度有规律四散 (孔雀开屏)

css 复制代码
    <style>
        body{
            background-color: #F6F6F6;
        }
        *{
            margin: 0;
            padding: 0;
        }
        ul{
            list-style: none;
        }

        #box{
            width: 200px;
            height: 300px; 
            margin: 200px auto;
            
        }

        #box ul{
             position: relative;
        }

        #box ul li{
            width: 200px;
            height: 300px;
            background-color: cyan;
            position: absolute;
            left: 0;
            top: 0;
            font-size: 30px;
            text-align: center;
            line-height: 300px;
            transition: all linear 1s;
            /* 修改动画过渡中心点 */
            transform-origin: bottom center; 
            background: url(./true.jpg) no-repeat;
            background-size: 100% 100%;
        }

        #box:hover ul li:nth-child(1){
            transform: rotate(-80deg) translate(0,-400px);
        }

        #box:hover ul li:nth-child(2){
            transform: rotate(-30deg) translate(0,-400px);
        }

        #box:hover ul li:nth-child(3){
            transform: rotate(20deg) translate(0,-400px);
        }

        #box:hover ul li:nth-child(4){
            transform: rotate(70deg) translate(0,-400px);
        }

        #box:hover ul li:nth-child(5){
            transform: rotate(120deg) translate(0,-400px);
        }

        #box:hover ul li:nth-child(6){
            transform: rotate(70deg) translate(0,-400px);
        }

    </style>
html 复制代码
<body>
    <div id="box">
        <ul>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
        </ul>
    </div>
</body>
相关推荐
召田最帅boy14 分钟前
通意千应语音播放(TTS)技术方案
ai·html
是上好佳佳佳呀1 小时前
【前端(九)】CSS Transform 2D/3D 变换笔记:分清两个原点,搞懂多重变换
前端·css·笔记
林恒smileZAZ1 小时前
CSS终于支持渐变色的过渡了[特殊字符]
css·html·css3
奇舞精选12 小时前
写 HTML 就能做视频?HeyGen 开源的这个工具有点意思
html·agent
hjt_未来可期15 小时前
修改浏览器滚动条
css
河阿里16 小时前
HTML5标准完全教学手册
前端·html·html5
之歆17 小时前
Day03_HTML 列表、表格、表单完整指南(下)
android·javascript·html
索木木19 小时前
ShortCut MoE模型分析
前端·html
轮子大叔19 小时前
CSS基础入门
前端·css
ShineWinsu20 小时前
CSS 技术文章
前端·css