css实现一个太极阴阳旋转动画效果代码
代码语言:html
所属分类:动画
代码描述:css实现一个太极阴阳旋转动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> .yinyang { background: linear-gradient(to right, #43F0A1, #43F0A1 50%, #C55BF0 50%, #C55BF0); /* Adjust the following three values to change the size */ width: 50vw; height: 50vw; font-size: 25vw; /* */ border-radius: 50%; display: flex; flex-direction: column; align-items: center; animation: spin 12s infinite linear; box-shadow: 0 0 75px -25px #43F0A1; } .yinyang .yin, .yinyang .yang { background: linear-gradient(to left, #43F0A1, #43F0A1 50%, #C55BF0 50%, #C55BF0); width: 50%; height: 50%; border-radius: 50%; display: flex; flex-direction: column; align-items: center; animation: spin 6s infinite linear reverse; } .yinyang .yin:before, .yinyang .yang:before, .yinyang .yin:after, .yinyang .yang:after { content: '\2022'; background-color: #C55BF0; width: 50%; height: 50%; border-radius: 50%; display: flex; justify-content: center; align-items: center; color: #43F0A1; } .yinyang .yin:after, .yinyang .yang:after { background-color: #43F0A1; color: #C55BF0; } @keyframes spin { to { transform: rotate(360deg); } } /* Codepen */ body { backg.........完整代码请登录后点击上方下载按钮下载查看
网友评论0