CSS 3D 翻转效果兼容IE11

2020-7-15 Jon html+css

先看效果

css 3d 翻转效果

代码
<!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 3D翻转特效兼容 IE</title>
  <style>
    .content {
      width: 200px;
      height: 200px;
      color: transparent;
      font-size: 30px;
      cursor: pointer;
      text-align: center;
      line-height: 200px;
      margin: 50px;
      position: relative;
    }
    .child {
      position: absolute;
      top: 0px;
      left: 0px;
      bottom: 0px;
      right: 0px;
      line-height: 200px;
      transform-origin: 50% 50% -100px;
      transition: 0.3s;
    }
    .child01 {
      display: block;
      color: #059dd9;
      border: 1px solid #10adf2;
    }
    .child02 {
      color: white;
      background: #10adf2;
      transform: rotateY(90deg);
    }
    .content:hover .child01 {
      transform: rotateY(-90deg);
    }
    .content:hover .child02 {
      transform: rotateY(0);
    }
  </style>
</head>
<body>
  <div class="content">
    <div class="child child01">3D立体翻转</div>
    <div class="child child02">3D翻转22</div>
  </div>
</body>
</html>

标签: css

分享这篇文章
赞助鼓励:如果觉得内容对您有所帮助,您可以支付宝(左)或微信(右):

声明:如无特殊注明,所有博客文章版权皆属于作者,转载使用时请注明出处。谢谢!

发表评论:

皖ICP备15010162号-1 ©2015-2022 知向前端
qq:1614245331 邮箱:13515678147@163.com Powered by emlog sitemap