div+css布局实现火影忍者漩涡鸣人效果代码
代码语言:html
所属分类:布局界面
代码描述:div+css布局实现火影忍者漩涡鸣人效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> *, *::after, *::before { box-sizing: border-box; outline: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } *:focus { outline: none; } body { display: flex; justify-content: flex-end; align-items: center; flex-direction: column; min-height: 100vh; overflow: hidden; background: radial-gradient(at bottom center, #fff1 10%, transparent 60%), linear-gradient(90deg, #0004 10%, #fff2 40% 60%, #0004 90%); background-color: #4e3126; } .container { height: 533px; width: 600px; position: relative; } .container .ball { height: 75px; width: 75px; position: absolute; top: 52px; left: 83px; border-radius: 50%; -webkit-animation: fly 2s ease-in-out infinite alternate; animation: fly 2s ease-in-out infinite alternate; background: radial-gradient(at 30% 30%, #6662 20%, #0000), radial-gradient(at 30% 30%, #4443 70%, #0000), radial-gradient(black 60%, #fff 100%); } .container .ball:nth-child(2) { top: 293px; left: 0; } .container .ball:nth-child(3) { top: 120px; left: 511px; } .container .ball:nth-child(4) { top: 359px; left: 524px; } .container .ball:nth-child(5) { top: -90px; left: 320px; } .container .naruto { height: 507px; width: 417px; position: absolute; top: 26px; left: 93px; -webkit-animation: flame 3s 5s ease-in-out infinite alternate; animation: flame 3s 5s ease-in-out infinite alternate; filter: drop-shadow(0 0 1px #f39637) drop-shadow(0 0 3px #f39637) drop-shadow(0 0 6px #f39637) drop-shadow(0 0 9px #f4f095); } .container .naruto .head { height: 214px; width: 155px; position: absolute; top: 0; left: 194px; } .container .naruto .head .hair { height: 52px; width: 116px; position: absolute; top: 39px; left: 19px; background: #f4f095; } .container .naruto .head .hair .lock-1 { height: 25px; width: 18px; position: absolute; bottom: 4px; left: -18px; overflow: hidden; } .container .naruto .head .hair .lock-1::after { height: 76px; width: 51px; content: ""; position: absolute; top: -70px; left: -11px; box-shadow: 9px 17px #f4f095; border-radius: 50%; } .container .naruto .head .hair .lock-2 { height: 42px; width: 10px; position: absolute; top: -19px; left: -3px; background: #f4f095; border-radius: 0 10px; -webkit-clip-path: polygon(20% 0, 100% 0, 100% 100%, 30% 100%, 0 50%); clip-path: polygon(20% 0, 100% 0, 100% 100%, 30% 100%, 0 50%); } .container .naruto .head .hair .lock-3, .container .naruto .head .hair .lock-6 { height: 88px; width: 20px; position: absolute; top: -40px; left: 5px; background: #f4f095; border-radius: 50%; -webkit-clip-path: polygon(40% 15%, 49% 0, 200% 0, 100% 200%, 5% 200%, 5% 37%, 20% 26%); clip-path: polygon(40% 15%, 49% 0, 200% 0, 100% 200%, 5% 200%, 5% 37%, 20% 26%); } .container .naruto .head .hair .lock-3::after, .container .naruto .head .hair .lock-6::after { height: 20px; width: 20px; content: ""; position: absolute; top: 35px; left: 10px; transform: rotate(-50deg); background: #f4f095; } .container .naruto .head .hair .lock-4 { height: 59px; width: 41px; position: absolute; top: -30px; left: 30px; background: #f4f095; border-radius: 50%; -webkit-clip-path: polygon(0 0, 22% 0%, 29% 20%, 49% 43%, 65% 17%, 73% 0, 100% 0, 100% 100%, 0 100%); clip-path: polygon(0 0, 22% 0%, 29% 20%, 49% 43%, 65% 17%, 73% 0, 100% 0, 100% 100%, 0 100%); } .container .naruto .head .hair .lock-5 { height: 59px; width: 30px; position: absolute; top: -26px; left: 70px; background: #f4f095; border-radius: 0 20px; -webkit-clip-path: polygon(43% 0, 100% 0, 100% 100%, 0 100%, 0 46%, 33% 36%, 43% 15%); clip-path: polygon(43% 0, 100% 0, 100% 100%, 0 100%, 0 46%, 33% 36%, 43% 15%); } .container .naruto .head .hair .lock-6 { top: -35px; left: 103px; transform: scalex(-1); } .container .naruto .head .hair .lock-7 { height: 40px; width: 18px; position: absolute; bottom: 4px; right: -18px; } .container .naruto .head .hair .lock-7::before { height: 40px; width: 10px; content: ""; position: absolute; top: -26px; left: -4px; transform: rotate(15deg) skewy(20deg); background: #f4f095; border-radius: 0 20px/0 40px; } .container .naruto .head .hair .lock-7::after { height: 66px; width: 61px; content: ""; position: absolute; top: -45px; right: 7px; box-shadow: 5px 20px #f4f095; border-radius: 50%; } .container .naruto .head .hair .lock-8 { height: 15px; width: 11px; position: absolute; bottom: -85px; left: -2px; overflow: hidden; z-index: -1; } .container .naruto .head .hair .lock-8::after { height: 30px; width: 11px; content: ""; position: absolute; bottom: 0; right: 8px; border-radius: 50%; box-shadow: 6px -1px #f39637; } .container .naruto .head .hair .lock-9 { height: 32px; width: 8px; content: ""; position: absolute; position: absolute; bottom: -100px; left: 6px; background: #f39637; -webkit-clip-path: polygon(0 0, 0 34%, 40% 100%, 95% 51%, 100% 0%); clip-path: polygon(0 0, 0 34%, 40% 100%, 95% 51%, 100% 0%); z-index: -1; } .container .naruto .head .hair .lock-10 { height: 61px; width: 17px; content: ""; position: absolute; position: absolute; bottom: -100px; right: 7px; background: #f39637; border-radius: 50%; -webkit-clip-path: polygon(0 0, 11% 100%, 46% 100%, 45% 81%, 60% 69%, 97% 94%, 100% 0%); clip-path: polygon(0 0, 11% 100%, 46% 100%, 45% 81%, 60% 69%, 97% 94%, 100% 0%); z-index: -1; } .container .naruto .head .face { height: 172px; width: 103px; position: absolute; bottom: 0; left: 24px; background: #f9e6ce; border-radius: 50%; } .container .naruto .head .face .ear { height: 39px; width: 15px; position: absolute; top: 83px; right: -12px; background: #f9e6ce; border-radius: 50%; transform: rotate(17deg); } .container .naruto .head .face .ear.left { left:.........完整代码请登录后点击上方下载按钮下载查看
网友评论0