纯css实现落地电风扇摇头运行效果
代码语言:html
所属分类:动画
代码描述:纯css实现落地电风扇摇头运行效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> * { box-sizing: border-box; } li { list-style: none; } html, body { height: 100%; } body { margin: 0; font-size: 5vmin; position: relative; background: #18b; box-sizing: border-box; -webkit-animation: bg 300s infinite ease-out; animation: bg 300s infinite ease-out; } #fan { position: absolute; top: calc(50% - 8em); left: calc(50% - 4em); } .oscillator { height: 8em; width: 8em; position: absolute; -webkit-animation: oscillate 8s infinite linear; animation: oscillate 8s infinite linear; } .guard { height: 8em; width: 8em; position: absolute; z-index: 10; } .frame { height: 8em; width: 8em; position: absolute; left: 0; top: 0; border: 0.25em solid #000; border-radius: 50%; } [class^="cir"] { position: absolute; border: 0.125em solid #000; border-radius: 50%; z-index: 12; } .cir1 { height: 7em; width: 7em; left: 0.5em; top: 0.5em; } .cir2 { height: 6em; width: 6em; left: 1em; top: 1em; } .cir3 .........完整代码请登录后点击上方下载按钮下载查看
网友评论0