div+css实现一个燃烧点亮的蜡烛动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css实现一个燃烧点亮的蜡烛动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link href="https://fonts.googleapis.com/css?family=Great+Vibes" rel="stylesheet"> <style> body { margin: 0; height: 100vh; display: flex; align-items: center; justify-content: center; background: mistyrose; } .candle { width: 10em; height: 30em; font-size: 7px; background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(246,246,246,1) 47%, rgba(237,237,237,1) 100%); box-shadow: inset 2em -3em 5em pink, inset -2em 0 5em pink; border-radius: 10em / 4em; position: relative; display: flex; justify-content: center; top: 10em; } .candle::before { content: ''; position: absolute; width: inherit; height: 5em; border: 0.2em solid pink; border-radius: 50%; box-sizing: border-box; background: radial-gradient( #444, white, pink, grey ); filter: opacity(0.7); } .thread { position: absolute; width: 0.6em; height: 3.6em; top: -1.8em; background: linear-gradient( #111, black, orange 90% ); border-radius: 40% 40% 0 0; } .flames { position: absolute; width: 2.4em; } .flames::before { content: ''; position: absolute; width: inherit; height: 6em; background-c.........完整代码请登录后点击上方下载按钮下载查看
网友评论0