div+css实现细蜡烛火苗燃烧动画效果代码

代码语言:html

所属分类:动画

代码描述:div+css实现细蜡烛火苗燃烧动画效果代码

代码标签: div css 蜡烛 火苗 燃烧 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
<style>
    body {
  background: #111;
  display: flex;
  margin: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.candle {
  width: 34px;
  margin: 30px auto 0 auto;
  position: relative;
  height: 80%;
  align-self: flex-end;
  -webkit-animation: blink 0.1s infinite;
          animation: blink 0.1s infinite;
}

.wick {
  position: absolute;
  width: 6px;
  height: 50px;
  background: #23161a;
  top: 110px;
  left: 50%;
  transform: translateX(-50%) skewX(2deg);
  border-radius: 10%;
  box-shadow: 0 0 2px 0px black;
}
.wick:before {
  content: "";
  position: absolute;
  width: 0;
  left: 50%;
  height: 10px;
  box-shadow: 0 -14px 10px 8px white, 0 -10px .........完整代码请登录后点击上方下载按钮下载查看

网友评论0