纯css实现自行车骑行效果
代码语言:html
所属分类:动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>cycle</title> <style> html, body { background: #c7ecee; height: 100%; width: 100%; font-size: 62.5%; display: flex; overflow-y: hidden; justify-content: center; } .cycle { width: 1rem; height: 1rem; background: #2d3436; position: absolute; top: 85%; border-radius: 100%; box-shadow: 0px 0px 0px 0.1rem #2d3436, 0px 0px 0px 0.5rem #c7ecee, 0px 0px 0px 0.6rem #2d3436, 0px 0px 0px 1.1rem #c7ecee, 0px 0px 0px 1.2rem #2d3436, 0px 0px 0px 1.6rem #c7ecee, 0px 0px 0px 1.7rem #2d3436, -14rem 0px 0px 7rem #c7ecee, -14rem 0px 0px 7.3rem #dfe6e9, -14rem 0px 0px 8.3rem #2d3436, 14rem 0px 0px 7rem #c7ecee, 14rem 0px 0px 7.3rem #dfe6e9, 14rem 0px 0px 8.3rem #2d3436; } .cycle:after, .cycle:before { content: ''; position: absolute; width: 2rem; height: 10rem; border-radius: 50%; background: #c7ecee; border-top: 0.5rem solid orange; border-right: 1rem solid transparent; border-left: 1rem solid transparent; border-bottom: 0.5rem solid orange; top: -5.2rem; animation: rotateWheel linear 0.6s infinite; } .cycle:after { left: 12.5rem; } .cycle:before { left: -15.5rem; } .cycle .rods { position: absolute; width: 2rem; height: 2rem; z-index: 1; background: #2d3436; right: 13.5rem; top: -0.5rem;.........完整代码请登录后点击上方下载按钮下载查看
网友评论0