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

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>
相关推荐
程序二次开发17 小时前
wordpress 文章页,文章分类,单页,woocommerc 产品页,分类页添加.html后缀
大数据·前端·html·php
a11177617 小时前
html制作的PPT(各种风格)提示词
前端·开源·html
JCJC错别字检测-田春峰17 小时前
字根秀秀 HTML 托管现已支持“用户登录”功能,一键变身 Web App!
前端·html·web app·网页托管
之歆17 小时前
Day20_PC 端电商商品详情页前端实战:从布局到放大镜与选项卡
开发语言·前端·javascript·css·less
夜雪闻竹17 小时前
Tailwind CSS v4 + Vite:现代前端样式方案
前端·css·ai
ZC跨境爬虫17 小时前
跟着 MDN 学CSS day_27:(处理不同方向的文本)
前端·javascript·css·ui·html
巴巴博一18 小时前
【AI 赋能前端】告别手写样式!ui-ux-pro-max-skill 插件完整使用指南(附高阶 Prompt 模板)
前端·css·人工智能·ui
ZC跨境爬虫18 小时前
跟着 MDN 学CSS day_24:(CSS调试完全指南)
前端·css·ui·html·tensorflow
学点程序19 小时前
HyperFrames:用 HTML 生成视频的开源渲染框架
前端·开源·html·音视频
昭昭颂桉a19 小时前
Tailwind CSS 完全指南 —— 从零到一,告别手写 CSS
前端·css