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> 

欢迎进群交流学习

相关推荐
imLix16 分钟前
RunLoop 实现原理
前端·ios
微小的xx21 分钟前
java + html 图片点击文字验证码
java·python·html
wayman_he_何大民22 分钟前
初始机器学习算法 - 关联分析
前端·人工智能
飞飞飞仔25 分钟前
别再瞎写提示词了!这份Claude Code优化指南让你效率提升10倍
前端·claude
刘永胜是我26 分钟前
node版本切换
前端·node.js
成小白30 分钟前
前端实现表格下拉框筛选和表头回显和删除
前端
wayman_he_何大民31 分钟前
初始机器学习算法 - 聚类分析
前端·人工智能
wycode32 分钟前
Vue2实践(3)之用component做一个动态表单(二)
前端·javascript·vue.js
用户1092257156101 小时前
你以为的 Tailwind 并不高效,看看这些使用误区
前端
意会1 小时前
微信闪照小程序实现
前端·css·微信小程序