纯css实现一个蜡烛燃烧动画效果
代码语言:html
所属分类:动画
代码描述:纯css实现一个蜡烛燃烧动画效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> body { margin: 0; height: 100vh; display: flex; align-items: center; justify-content: center; background: black; } .candle { width: 15em; height: 30em; font-size: 7px; background: linear-gradient( orange, darkorange, sienna, saddlebrown 50%, rgba(0, 0, 0, 0.6) ); box-shadow: inset 2em -3em 5em rgba(0, 0, 0, 0.4), inset -2em 0 5em rgba(0, 0, 0, 0.4); 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 darkorange; border-radius: 50%; box-sizing: border-box; background: radial-gradient( .........完整代码请登录后点击上方下载按钮下载查看
网友评论0