css3扑克牌展开折叠动画特效

 时间:2026-02-14 21:00:02

1、新建html文档。

css3扑克牌展开折叠动画特效

2、书写hmtl代码。

<div class="perspective">

  <div class='card-container'>

    <div class="message">点击 左侧 卡牌</div>

    <div class='card card-card1'>

      <div class='card__face card__face--top'>

        <span class='card__value'>

          A

        </span>

        <span class='card__suit'>

          <svg width="21px" height="16px" viewBox="0 0 21 16" version="1.1" >

              <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">

                  <path d="M1.6440972,15.2434886 L19.7934028,15.2434886 L10.71875,1.39282802 L1.6440972,15.2434886 Z" id="Path-2" stroke="#635F5C"></path>

              </g>

          </svg>

        </span>

      </div>

      <div class='card__face card__face--btm'>

        <span class='card__value'>

          A

        </span>

        <span class='card__suit'>

          <svg width="21px" height="16px" viewBox="0 0 21 16" version="1.1" >

              <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">

                  <path d="M1.6440972,15.2434886 L19.7934028,15.2434886 L10.71875,1.39282802 L1.6440972,15.2434886 Z" id="Path-2" stroke="#635F5C"></path>

              </g>

          </svg>

        </span>

      </div>

    </div>

css3扑克牌展开折叠动画特效

3、书写css代码。

body {

  background: #e7e7e7;

  font-family: 'Source Sans Pro', sans-serif;

  font-weight: 200;

  font-size: 1.4rem;

  height: 100vh;

  overflow: hidden;

  width: 100vw;

}

.inspired {

  border: 1px solid rgba(0, 0, 0, 0.1);

  border-radius: 4px;

  font-weight: 400;

  position: absolute;

  bottom: 6px;

  right: 6px;

  z-index: 10;

}

.inspired a {

  color: rgba(0, 0, 0, 0.4);

  display: inline-block;

  font-size: 16px;

  padding: 0 24px 10px;

  text-decoration: none;

}

.message {

  color: #eeeae7;

  text-shadow: 0 0 5px #b4b4b4;

  font-size: 32px;

  font-weight: 200;

  letter-spacing: -0.01em;

  line-height: 40px;

  position: absolute;

  transform: rotate(-31deg) translate3d(80%, 130%, 0);

  width: 3em;

}

css3扑克牌展开折叠动画特效

4、书写并添加js代码。

<script src='js/jquery.min.js'></script>

<script src="js/index.js"></script>

css3扑克牌展开折叠动画特效

5、代码整体结构。

css3扑克牌展开折叠动画特效

6、查看效果。

css3扑克牌展开折叠动画特效

  • 怎样当一个更加完美的男朋友
  • 甲基叔丁基醚分馏时柱顶的温度高了有什么不利
  • Python编程:如何创建一个集合对象
  • PHP中如何判断字符串是否含有中文
  • 如何制定健身运动计划?
  • 热门搜索
    如何制作自己的网站 商务英语怎么学 如何成为有钱人 德国旅游 dnf寂静城在哪里 袜子批发哪里最便宜 怎么画漫画人物步骤图 如何学习炒股 如何混合喂养 车前子泡水喝的功效