div+css实现星体天体在宇宙星空中自转动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css实现星体天体在宇宙星空中自转动画效果代码
代码标签: div+css 星体 天体 宇宙 星空 自转 动画效
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> .planet_wraper { position: absolute; top: 0; bottom: 0; left: 0; right: 0; width: 7rem; height: 7rem; margin: auto; border-radius: 50%; } .planet_shadow { background: -webkit-linear-gradient(top left, #24b88b 20%, #21776f); background: -moz-linear-gradient(top left, #24b88b 20%, #21776f); box-shadow: inset 0 -5px 10px rgba(22, 48, 64, 0.5), 0 0 1.5rem rgba(170, 194, 194, 0.3); } .planet { position: relative; width: 100%; height: 100%; border-radius: 50%; animation: rotate 15s linear infinite; overflow: hidden; } .planet_wraper::before, .planet_wraper::after { content: ''; display: block; position: absolute; border-radius: 50%; box-shadow: 0 0.1rem 0.1rem rgba(170, 194, 194, 0.1), inset 0 -0.1rem 0.1rem rgba(170, 194, 194, 0.1); animation: rotate 5s linear infinite; } .planet_wraper::before { top: -1.75rem; left: -1.75rem; width: 11rem; height: 11rem; animation-delay: 1s; } .planet_wraper::after { top: -2.5rem; left: -2.5rem; width: 15rem; height: 15rem; } .planet > * { position: relative; border-radius: 50%; background-color: #209b85; box-shadow: inset 1px 1px .........完整代码请登录后点击上方下载按钮下载查看
网友评论0