纯css实现彩带飘飘动画效果
代码语言:html
所属分类:动画
代码描述:纯css实现彩带飘飘动画效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> .curveWrap { opacity: 1; width: 150vw; height: 100vh; position: absolute; -webkit-transform: translateX(-30vw) rotate(-15deg); transform: translateX(-30vw) rotate(-15deg); will-change: transform; } .curveWrap .curve { stroke-linecap: round; stroke-opacity: 0; } .curveWrap .curve path { -webkit-transform-origin: center; transform-origin: center; } .curveWrap .curve path:nth-child(1) { stroke-width: 5; -webkit-animation: curve 35s linear 1.6s infinite; animation: curve 35s linear 1.6s infinite; } .curveWrap .curve path:nth-child(6n + 1) { stroke: goldenrod; } .curveWrap .curve path:nth-child(6n + 2) { stroke: cornflowerBlue; } .curveWrap .curve path:nth-child(6n + 3) { stroke: GreenYellow; } .curveWrap .curve path:nth-child(6n + 4) { stroke: lightblue; } .curveWrap .curve path:nth-child(6n + 5) { stroke: darkgreen; } .curveWrap .curve path:nth-child(6n + 6) { stroke: olive; } .curveWrap .curve path:nth-child(2) { stroke-width: 32; -webkit-animation: curve 35s linear 3.2s infinite; animation: curve 35s linear 3.2s infinite; } .curveWrap .curve path:nth-child(6n + 1) { stroke: goldenrod; } .curveWrap .curve path:nth-child(6n + 2) { stroke: cornflowerBlue; } .curveWrap .curve path:nth-child(6n + 3) { stroke: GreenYellow; } .curveWrap .curve path:nth-child(6n + 4) { stroke: lightblue; } .curveWrap .curve path:nth-child(6n + 5) { stroke: darkgreen; } .curveWrap .curve path:nth-child(6n + 6) { stroke: olive; } .curveWrap .curve path:nth-child(3) { stroke-width: 33; -webkit-animation: curve 35s linear 4.8s infinite; animation: curve 35s linear 4.8s infinite; } .curveWrap .curve path:nth-child(6n + 1) { stroke: goldenrod; } .curveWrap .curve path:nth-child(6n + 2) { stroke: cornflowerBlue; } .curveWrap .curve path:nth-child(6n + 3) { stroke: GreenYellow; } .curveWrap .curve path:nth-child(6n + 4) { stroke: lightblue; } .curveWrap .curve path:nth-child(6n + 5) { stroke: darkgreen; } .curveWrap .curve path:nth-child(6n + 6) { stroke: olive; } .curveWrap .curve path:nth-child(4) { stroke-width: 48; -web.........完整代码请登录后点击上方下载按钮下载查看
网友评论0