css实现图片绕中心旋转,鼠标悬浮按钮炫酷展示

 vue模板中代码

<div class="contentBox clearfix home">
    <div class="circle">
        <img class="in-circle" src="../../assets/img/in-circle.png" alt="">
        <img class="out-circle" src="../../assets/img/out-circle.png" alt="">
    <div><img src="../../assets/img/hbsztda.png" alt=""></div>
    </div>
        <div class="leftAndRight left-wing">
        <div class="left-1"  @click="goPath(ztList[0])" style="color: #fff">
             {{ ztList[0].name }}
        </div>
    <div class="left-2"  @click="goPath(ztList[1])">
         {{ ztList[1].name }}
    </div>
    <div class="left-3"  @click="goPath(ztList[2])">
         {{ ztList[2].name }}
    </div>
    <div class="left-4"  @click="goPath(ztList[3])">
         {{ ztList[3].name }}
    </div>
    <div class="left-5"  @click="goPath(ztList[4])">
         {{ ztList[4].name }}
    </div>
    </div>
    <div class="leftAndRight right-wing">
    <div class="right-1"  @click="goPath(ztList[5])">
         {{ ztList[5].name }}
    </div>
    <div class="right-2"  @click="goPath(ztList[6])">
         {{ ztList[6].name }}
    </div>
    <div class="right-3"  @click="goPath(ztList[7])">
         {{ ztList[7].name }}
    </div>
    <div class="right-4"  @click="goPath(ztList[8])">
         {{ ztList[8].name }}
    </div>
    <div class="right-5"  @click="goPath(ztList[9])">
         {{ ztList[9].name }}
    </div>
    </div>
</div>

 css代码

.home {
        width: 100vw;
        height: 100%;
        background: #000F17;
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        .circle {
            width: 505px;
            height: 505px;
            max-width: 100%;
            max-height: 100%;
            text-align: center;
            background-size: 100% 100%;
            color: #FFFFFF;
            font-size: 40px;
            font-family: Microsoft YaHei UI, Microsoft YaHei UI;
            font-weight: 400;
            position: relative;
            display: grid;
            place-items: center;
            .in-circle {
                width: 400px;
                height: 400px;
                position: absolute;
                transition: 0.5s;
                transform-origin: center center;  
                animation: rotation 10s linear infinite;
            }
            @-webkit-keyframes rotation{
                from {-webkit-transform: rotate(0deg);}
                to {-webkit-transform: rotate(360deg);}
            }
            .out-circle {
                width: 100%;
                height: 100%;
                position: absolute;
                transition: 0.5s;
                transform-origin: center center;  
                animation: rotateImg 10s linear infinite;
            }
            @-webkit-keyframes rotateImg{
                from {-webkit-transform: rotate(0deg);}
                to {-webkit-transform: rotate(-360deg);}
            }
            div {
                margin: auto;
            }
        }
        .leftAndRight {
            width: 35vw;
            height: 80vh;
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            font-size: 24px;
            color: #FFFFFF;
            display: flex;
            flex-direction: column;
            justify-content: space-around;
        }
        .left-wing {
            left: 0;
            background: url('../../assets/img/left.png') no-repeat;
            background-position: right;
            background-size: auto 100%;
            text-align: right;
        }
        .right-wing {
            right: 0;
            background: url('../../assets/img/right.png') no-repeat;
            background-size: auto 100%;
            align-items: flex-end;
        }
        .left-1,
        .left-2, 
        .left-3,
        .left-4,
        .left-5 {
            width: 22vw;
            height: 8vh;
            line-height: 8vh;
            text-align: center;
            box-sizing: border-box;
            border: 0.5px solid #D8D8D8;
            cursor: pointer;
            color: #fff;
            background-color: plum;
            background-color:#bb65c3;
            border: none;
            transition: all 0.3s ease-in-out;
            filter: hue-rotate(calc(4.6 * 137deg));
        }
        .left-1 {
            margin-left: 10%;
        }
        .left-2 {
            margin-left: 17%;
        }
        .left-3 {
            margin-left: 25%;
        }
        .left-4 {
            margin-left: 17%;
        }
        .left-5 {
            margin-left: 10%;
        }

        .left-1::before,
        .left-1::after,
        .left-2::before,
        .left-2::after,
        .left-3::before,
        .left-3::after,
        .left-4::before,
        .left-4::after,
        .left-5::before,
        .left-5::after,
        .right-1::before,
        .right-1::after,
        .right-2::before,
        .right-2::after,
        .right-3::before,
        .right-3::after,
        .right-4::before,
        .right-4::after,
        .right-5::before,
        .right-5::after {
            /* 将两个伪元素的相同部分写在一起 */
            content: "";
            position: absolute;
            width: 20px;
            height: 20px;
            border: 2px solid plum;
            /* 动画过渡 最后的0.3s是延迟时间 */
            transition: all 0.3s ease-in-out 0.3s;
        }
        .left-1::before,
        .left-2::before,
        .left-3::before,
        .left-4::before,
        .left-5::before,
        .right-1::before,
        .right-2::before,
        .right-3::before,
        .right-4::before,
        .right-5::before {
            top: 0;
            left: 0;
            /* 删除左边元素的右、下边框 */
            border-right: 0;
            border-bottom: 0;
        }
        .left-1::after,
        .left-2::after,
        .left-3::after,
        .left-4::after,
        .left-5::after,
        .right-1::after,
        .right-2::after,
        .right-3::after,
        .right-4::after,
        .right-5::after {
            bottom: 0;
            right: 0;
            /* 删除右边元素的左、上边框 */
            border-top: 0;
            border-left: 0;
        }
        .left-1:hover,
        .left-2:hover,
        .left-3:hover,
        .left-4:hover,
        .left-5:hover,
        .right-1:hover,
        .right-2:hover,
        .right-3:hover,
        .right-4:hover,
        .right-5:hover {
            background-color: plum;
            // color: #000;
            /* 发光效果和倒影 */
            box-shadow: 0 0 50px plum;
            /* below是下倒影 1px是倒影的元素相隔的距离 最后是个渐变颜色 */
            -webkit-box-reflect: below 1px linear-gradient(transparent,rgba(0,0,0,0.3));
            /* 设置以上属性的延迟时间 */
            // transition-delay: 0.4s;
            background-color:#bb65c3;
            border: none;

        }
        .left-1:hover::before,
        .left-1:hover::after,
        .left-2:hover::before,
        .left-2:hover::after,
        .left-3:hover::before,
        .left-3:hover::after,
        .left-4:hover::before,
        .left-4:hover::after,
        .left-5:hover::before,
        .left-5:hover::after,
        .right-1:hover::before,
        .right-1:hover::after,
        .right-2:hover::before,
        .right-2:hover::after,
        .right-3:hover::before,
        .right-3:hover::after,
        .right-4:hover::before,
        .right-4:hover::after,
        .right-5:hover::before,
        .right-5:hover::after {
            width: 60%;
            height: 60%;
            transition-delay: 0s;
        }
        .right-1,
        .right-2, 
        .right-3,
        .right-4,
        .right-5 {
            width: 22vw;
            height: 8vh;
            line-height: 8vh;
            text-align: center;
            box-sizing: border-box;
            cursor: pointer;
            color: #fff;
            background-color: plum;
            background-color:#bb65c3;
            border: none;
            transition: all 0.3s ease-in-out;
            filter: hue-rotate(calc(4.6 * 137deg));
        }
        .right-1 {
            margin-right: 10%;
        }
        .right-2 {
            margin-right: 17%;
        }
        .right-3 {
            margin-right: 25%;
        }
        .right-4 {
            margin-right: 17%;
        }
        .right-5 {
            margin-right: 10%;
        }
    }
    @media screen and (max-width:1600px){
        .home .circle{
            font-size: 28px;
            width: 385px;
            height: 385px;
            line-height: 385px;
            .in-circle {
                width: 300px;
                height: 300px;
            }
        }
        .home .leftAndRight {
            font-size: 22px;
        }
    }
    @media screen and (max-width:1366px){
        .home .circle{
            width: 205px;
            height: 205px;
            line-height: 205px;
            font-size: 26px;
            .in-circle {
                width: 200px;
                height: 200px;
            }
        }
        .home .leftAndRight {
            font-size: 20px;
        }
    }

运行效果

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/184532.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【小尘送书-第十二期】计算机考研精炼1000题——助力每一个考研人成功上岸

大家好&#xff0c;我是小尘&#xff0c;欢迎你的关注&#xff01;大家可以一起交流学习&#xff01;欢迎大家在CSDN后台私信我&#xff01;一起讨论学习&#xff0c;讨论如何找到满意的工作&#xff01; &#x1f468;‍&#x1f4bb;博主主页&#xff1a;小尘要自信 &#x1…

flutter,uni-app开发调试ios

一、申请ios开发者账号 二、ios开发者配置 ios 开发者需要配置的地方 https://developer.apple.com/account/resources/certificates/list Certificates&#xff08;证书&#xff09;: 作用&#xff1a; 证书用于对应用程序和开发者进行身份验证&#xff0c;确保安全性和可…

企业数字化转型转什么?怎么转?这份攻略请收好

目录 -01-数字化转型“是什么” -02-数据驱动推动企业数字化转型 -03-企业数字化转型的行动路线图 数字化转型&#xff0c;转什么&#xff1f;怎么转&#xff1f;这些问题仍在困扰不少企业&#xff0c;也是每个企业转型升级不得不思考的重要问题。对此&#xff0c;中关村数字…

Docker Desktop 安装使用教程

一、前言 作为开发人员&#xff0c;在日常开发中&#xff0c;我们需要在本地去启动一些服务&#xff0c;如&#xff1a;redis、MySQL等&#xff0c;就需要去下载这些在本地去启动&#xff0c;操作较为繁琐。此时&#xff0c;我们可以使用Docker Desktop&#xff0c;来搭建我们需…

【SpringCloud】微服务的扩展性及其与 SOA 的区别

一、微服务的扩展性 由上一篇文章&#xff08;没看过的可点击传送阅读&#xff09;可知&#xff0c; 微服务具有极强的可扩展性&#xff0c;这些扩展性包含以下几个方面&#xff1a; 性能可扩展&#xff1a;性能无法完全实现线性扩展&#xff0c;但要尽量使用具有并发性和异步…

hive 报错return code 40000 from org.apache.hadoop.hive.ql.exec.MoveTask解决思路

参考学习 https://github.com/apache/hive/blob/2b57dd27ad61e552f93817ac69313066af6562d9/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java#L47 为啥学习error code 开发过程中遇到以下错误&#xff0c;大家觉得应该怎么办&#xff1f;从哪方面入手呢&#xff1f; 1.百…

系列二、Spring整合单元测试

一、概述 Spring中获取bean最常见的方式是通过ClassPathXmlApplicationContext 或者 AnnotationConfigApplicationContext的getBean()方式获取bean&#xff0c;那么在Spring中如何像在SpringBoot中直接一个类上添加个SpringBootTest注解&#xff0c;即可在类中注入自己想要测试…

小程序:project.config.json / project.private.config.json / 项目配置文件 /拉取代码产生冲突 / 如何解决

一、理解project.config.json / project.private.config.json project.config.json 文件是项目的配置文件&#xff0c;它包含了关于小程序的一些基本信息&#xff0c;例如小程序的名称、App ID、开发者信息以及页面路径等。这个文件一般不会被提交到版本控制系统中&#xff0c;…

个人财务管理软件CheckBook Pro mac中文版特点介绍

CheckBook Pro mac是一款Mac平台的个人财务管理软件&#xff0c;主要用于跟踪个人收入、支出和账户余额等信息。 CheckBook Pro mac 软件特点 简单易用&#xff1a;该软件的用户界面非常简洁明了&#xff0c;即使您是初学者也可以轻松上手。 多账户管理&#xff1a;该软件支持…

ubuntu22.04 arrch64版操作系统编译zlmediakit

脚本 系统没有cmake&#xff0c;需要通过apt先进行下载&#xff0c;下面的脚本已经包含了 # 安装依赖 gcc-c.x86_64 这个不加的话会有问题 sudo yum -y install gcc gcc-c libssl-dev libsdl-dev libavcodec-dev libavutil-dev ffmpeg git openssl-devel gcc-c.x86_64 ca…

行业案例:如何打造高效内容团队

内容团队如何适应当下热点高频更新的时代&#xff1f;Zoho Projects项目管理软件能为内容团队带来什么&#xff1f;本文以真实用户案例为您详细解答&#xff01; 背景介绍&#xff1a; 该漫画团队已有十余年的奋斗历史&#xff0c;以原创漫画和绘本内容创作为主&#xff0c;出…

ruoyi-plus使用Statistic统计组件升级element-plus

原本使用的就是gitee上lionli的ruoyi-plus版本的代码。但是在使用过程中作首页数据看板时想使用elementui的Statistic统计组件。结果在浏览器控制台报错找不到组件el-statistic 于是查看elementui的历史版本&#xff0c;发现是在新版中才有这个组件&#xff0c;旧版本是没这个组…

如果把数组对应的值放到对象的对应key对应的值中

开发中 遇到一个数组&#xff0c;需要把数组中的value放到一个对象中 对象的key对应到数组的name&#xff0c; 话不多说 &#xff0c;直接上代码 this.result.forEach(item > {this.screen[Object.keys(this.screen).find(e > e item.name)] item.value}) 思路是这…

电商数据采集中如何采集1688平台商品详情SKU数据

一、背景介绍 1688.com是阿里旗下国内最大的B2B批发采购平台&#xff0c;1688分销客是依托此平台的官方营销平台&#xff0c;通过此平台API接口的接入推广平台商家的商品&#xff0c;按照商品成交金额的一定比例获得佣金。可以调用1688平台上的商品详情&#xff0c;SKU数据&…

系列五、声明式事务(xml方式)

一、概述 声明式事务(declarative transaction management)是Spring提供的对程序事务管理的一种方式&#xff0c;Spring的声明式事务顾名思义就是采用声明的方式来处理事务。这里所说的声明&#xff0c;是指在配置文件中声明&#xff0c;用在Spring配置文件中声明式的处理事务来…

从文本生成到数据增强:探索 AI 前沿的开源套件 | 开源专题 No.44

Significant-Gravitas/AutoGPT Stars: 150.4k License: MIT AutoGPT 是开源 AI 代理生态系统的核心工具包。它采用模块化和可扩展的框架&#xff0c;使您能够专注于以下方面&#xff1a; 构建 - 为惊人之作打下基础。测试 - 将您的代理调整到完美状态。查看 - 观察进展成果呈…

DFS序和欧拉序的降维打击

1. DFS 序和时间戳 1.1 DFS 序 定义&#xff1a;树的每一个节点在深度优先遍历中进、出栈的时间序列。 如下树的 dfs 序就是[1,2,8,8,5,5,2,4,3,9,9,3,6,6,4,7,7,1]。 下图为生成DFS的过程。对于一棵树进行DFS序&#xff0c;除了进入当前节点时对此节点进行记录&#xff0c;…

PSP - 从头搭建 抗原类别 (GPCR) 的 蛋白质结构预测 项目流程

欢迎关注我的CSDN&#xff1a;https://spike.blog.csdn.net/ 本文地址&#xff1a;https://spike.blog.csdn.net/article/details/134595717 GPCRs&#xff08;G Protein-Coupled Receptors&#xff0c;G蛋白偶联受体&#xff09;&#xff0c;又称为7次跨膜受体&#xff0c;是细…

浅析jdk8所包含的主要特性

至今Java 8仍然是许多开发者首选的JDK版本&#xff0c;Java 8的生态系统非常成熟&#xff0c;许多库和框架都已经适配了Java 8。迁移到新的Java版本可能需要重新评估和调整现有的依赖关系&#xff0c;这对于一些大型项目可能是一个挑战。那么Java 8有哪些特性让多数开发者钟爱呢…
最新文章