久久资源网

纯css3木柴篝火动画特效

纯css3木柴篝火动画特效

2019-04-21 10:34:50 CSS3实例

售价:5.00积分 会员免费

特别声明:资源售价只是赞助,不代表代码或者素材本身点数。收取费用仅维持本站的日常运营所需!

纯css3木柴篝火动画特效

css3基于transform和animation属性绘制卡通木柴燃烧的篝火动画场景特效。

使用方法

1、head引入css文件

<link type="text/css" href="css/style.css" rel="stylesheet" />

2、body引入HTML代码

<div class="stage">
  <div class="campfire">
    <div class="sparks">
      <div class="spark"></div>
      <div class="spark"></div>
      <div class="spark"></div>
      <div class="spark"></div>
      <div class="spark"></div>
      <div class="spark"></div>
      <div class="spark"></div>
      <div class="spark"></div>
    </div>
    <div class="logs">
      <div class="log">
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
      </div>
      <div class="log">
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
      </div>
      <div class="log">
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
      </div>
      <div class="log">
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
      </div>
      <div class="log">
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
      </div>
      <div class="log">
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
      </div>
      <div class="log">
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
        <div class="streak"></div>
      </div>
    </div>
    <div class="sticks">
      <div class="stick"></div>
      <div class="stick"></div>
      <div class="stick"></div>
      <div class="stick"></div>
    </div>
    <div class="fire">
      <div class="fire__red">
        <div class="flame"></div>
        <div class="flame"></div>
        <div class="flame"></div>
        <div class="flame"></div>
        <div class="flame"></div>
        <div class="flame"></div>
        <div class="flame"></div>
      </div>
      <div class="fire__orange">
        <div class="flame"></div>
        <div class="flame"></div>
        <div class="flame"></div>
        <div class="flame"></div>
        <div class="flame"></div>
        <div class="flame"></div>
        <div class="flame"></div>
      </div>
      <div class="fire__yellow">
        <div class="flame"></div>
        <div class="flame"></div>
        <div class="flame"></div>
        <div class="flame"></div>
        <div class="flame"></div>
      </div>
      <div class="fire__white">
        <div class="flame"></div>
        <div class="flame"></div>
        <div class="flame"></div>
        <div class="flame"></div>
        <div class="flame"></div>
        <div class="flame"></div>
        <div class="flame"></div>
      </div>
    </div>
  </div>
</div>

资源出处:https://www.moyublog.com/codes/9423.html

关注微信