CSS3 旋转的八卦图
经常看到旋转八卦图,所以亲自动手用css写了一个,兼容方面还未做处理
原理很简单,先画好八卦图后,旋转即可
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title></title> <style> #container{height: 200px;width: 200px;border-radius: 202px;box-shadow: 0 0 4px #666666;margin: 100px auto; background: linear-gradient(90deg,black 50%,white 50%);} #top,#bottom{height: 75px;width: 100px;padding-top:25px;margin: 0 auto;border-radius: 100px} #inner1,#inner2{height:50px;width: 50px;margin: 0 auto;border-radius: 50px; } #inner1{background: black} #inner2{background: white} #top{background: white} #bottom{background: black} @keyframes bonce{ 0%{transform: rotate(0deg)} 100%{transform: rotate(360deg)} } #container{animation-name: bonce;animation-duration: 5s;animation-iteration-count: 100;animation-timing-function: linear;} </style> </head> <body> <div id="container"> <div id="top"> <div id="inner1"></div> </div> <div id="bottom"> <div id="inner2"></div> </div> </div> </body> </html>
.
相关推荐
冰蝶 2020-03-01
somboy 2020-02-29
zengni 2020-02-23
lanzhusiyu 2020-01-12
MaureenChen 2020-01-01
AlisaClass 2019-11-18
scssqly轩 2019-11-17
zengni 2019-10-27
懵懂听风雨 2015-11-12
ozhanjun 2019-09-08
沈宫新 2018-02-05
lanzhusiyu 2018-01-05
走向WEB开发 2017-09-18
buttonChan 2018-04-24
走向WEB开发 2018-02-18
css教程 2018-02-15
dangzhangjing 2019-07-01
yaodilu 2019-06-30