HTML+CSS太极效果(附源码!!!)

展示效果

源码

html 复制代码
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>css做的太极,鼠标触发旋转</title>
    <style>
      body {
      	background-color:#999;
      }
      .bg {
      	height:800px;
      }
      .d1 {
      	margin:0 auto;
      	margin-top:150px;
      	width:400px;
      	height:400px;
      	transition-duration:0.5s;
      }
      .taiji {
      	width:300px;
      	height:300px;
      	background-color:black;
      	position:absolute;
      	top:200px;
      	left:540px;
      	margin:0 auto;
      	border-radius:200px 200px;
      	transition-duration:5s;
      }
      .tr {
      	width:150px;
      	height:300px;
      	background-color:white;
      	border-radius:200px 0 0 200px;
      	transition-duration:5s;
      }
      .trr {
      	width:150px;
      	height:150px;
      	border-radius:200px 200px 200px 200px;
      	position:relative;
      	left:80px;
      	background-color:white;
      }
      .trr1 {
      	background-color:black;
      }
      .trr2 {
      	top:50px;
      	left:50px;
      	width:40px;
      	height:40px;
      	background-color:black;
      }
      .trr3 {
      	background-color:white;
      }
      .d1:hover {
      	background-color:#999;
      	/* transition:50px 50px; */
      	/* transform:scaleX(2); */
      }
      .taiji:hover {
      	transform:scale(2.5) rotate(180deg);
      	opacity:0.05;
      }
      .tr:hover {
      	color:white;
      }
    </style>
  </head>
  <body>
    <div class="d1">
      <div class="taiji">
        <div class="tr">
          <div class="bg">
            <div class="trr">
              <div class="trr trr2"></div>
            </div>
            <div class="trr trr1">
              <div class="trr trr2 trr3"></div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </body>
</html> 

欢迎进群交流学习

相关推荐
Cyclo-34 分钟前
PDFJS 在React中的引入 使用组件打开文件流PDF
前端·react.js·pdf
椒盐螺丝钉3 小时前
Vue Router应用:组件跳转
前端·javascript·vue.js
顾安r3 小时前
11.20 开源APP
服务器·前端·javascript·python·css3
敲敲了个代码4 小时前
CSS 像素≠物理像素:0.5px 效果的核心密码是什么?
前端·javascript·css·学习·面试
少云清4 小时前
【软件测试】5_基础知识 _CSS
前端·css·tensorflow
倔强青铜三4 小时前
AI编程革命:React + shadcn/ui 将终结前端框架之战
前端·人工智能·ai编程
天外飞雨道沧桑4 小时前
前端开发 Cursor MCP 提效工具配置
前端·vscode·ai编程·开发工具·cursor
朱哈哈O_o5 小时前
前端通用包的作用——jquery篇
前端
葡萄城技术团队5 小时前
纯前端驱动:在线 Excel 工具的技术革新与实践方案
前端·excel
芳草萋萋鹦鹉洲哦5 小时前
【vue】调用同页面其他组件方法几种新思路
前端·javascript·vue.js