css卡片翻转 父元素翻转子元素不翻转效果

css卡片翻转 父元素翻转子元素不翻转效果

复制代码
vue
<div class="moduleBox">
      <div class="headTitle">
        <span class="headName">大额案例</span>
      </div>
      <div class="moduleItem">
        <span class="moduleNum">--</span>
        <span class="moduleLabel">待处理</span>
      </div>
      <div class="moduleItem">
        <span class="moduleNum">--</span>
        <span class="moduleLabel">待审核</span>
      </div>
      <div class="moduleItem">
        <span class="moduleNum">--</span>
        <span class="moduleLabel">待审批</span>
      </div>
    </div>

scss
.moduleBox{
  display:flex;
  justify-content:space-evenly;
      align-items:center;
  width:30%;
  height:320px;
  background:#ccdbfe;
  margin:22px 1.6%;
   border-radius:6px;
   position: relative; 
   perspective: 1000px; /* 设置透视 */
   transform: translateZ(0); /* 开启硬件加速 */
   .headTitle{
    width: 200px;     
        border-bottom: 43px solid transparent;                  
        border-top: 43px solid #4c7efd;  
        border-left: 13px solid transparent;          
        border-right: 13px solid transparent;
    position:absolute;
    top:0;
    left:calc(50% - 113px);
    .headName{
      width:100%;
      text-align:center;
      font:18px/40px '';
      position:absolute;
      top:-40px;
      color:#fff;
    }
   }
  .moduleItem{
  width:26%;
  height:90px;
  background:#c1d2fd;
   border-radius:3px;
  display:flex;
  justify-content:center;
      align-items:center;
      flex-direction:column;
      transition: 0.4s ease-in-out;
      color:#4d7EFD;
      cursor:pointer;
    .moduleNum{
      font:28px/34px '';
      transition: 0.4 0.6;
    }
    .moduleLabel{
      font:14px/20px '';
      transition: 0.4 0.6;
    }
    
  }
    .moduleItem:hover{
      background:#4c7efd;
      color:#fff;
      transform: rotateX(180deg);
      .moduleNum{
      transform: rotateX(-180deg);
      }
      .moduleLabel{
      transform: rotateX(-180deg);
      }
  }
}
相关推荐
ZC跨境爬虫1 天前
DES、AES、RSA 加密算法详解(含 JS/Python 实现 + 逆向实战案例)
前端·javascript·python
sunwenjian8861 天前
Spring aop 五种通知类型
java·前端·spring
LlNingyu1 天前
什么是SSRF,它最基本的形式是什么(一)
前端·网络·安全·web安全·xss·csrf
We་ct1 天前
LeetCode 136. 只出现一次的数字:线性时间+常量空间最优解拆解
前端·算法·leetcode·typescript·位运算
HAPPY酷1 天前
3A游戏图形设置终极优化指南:从通用法则到实战应用
java·前端·游戏
达达爱吃肉1 天前
openclaw 4.2 飞书出图的bug
java·前端·数据库
lightqjx1 天前
【前端】前端学习二之CSS
前端·css·学习·html
IT东1 天前
Vue 多环境部署全解析:解决测试与生产一致性难题
前端·javascript·vue.js
of Watermelon League1 天前
Redis 通用命令
前端·redis·bootstrap
chxii1 天前
配置Nginx 的 Keepalive 提升每秒查询率(QPS)
前端·nginx