css可以实现很多酷炫的效果,今天我们就来说说使用css如何实现激光切割钢板的酷炫效果。
<html> <head> <meta charset="UTF-8"> <link rel="apple-touch-icon" type="image/png" href="https://cpwebassets.codepen.io/assets/favicon/apple-touch-icon-5ae1a0698dcc2402e9712f7d01ed509a57814f994c660df9f7a952f3060705ee.png"> <meta name="apple-mobile-web-app-title" content="CodePen"> <link rel="shortcut icon" type="image/x-icon" href="https://cpwebassets.codepen.io/assets/favicon/favicon-aec34940fbc1a6e787974dcd360f2c6b63348d4b1f4e06c77743096d55480f33.ico"> <link rel="mask-icon" type="image/x-icon" href="https://cpwebassets.codepen.io/assets/favicon/logo-pin-8f3771b1072e3c38bd662872f6b673a722f4b3ca2421637d5596661b4e2132cc.svg" color="#111"> <title>css实现激光切割钢板的高级效果www.woaidaogu.com</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <style> @property --xPoint { syntax: "<length>"; inherits: false; initial-value: 400px; } @property --yPoint { syntax: "<length>"; inherits: false; initial-value: 300px; } @property --x2Point { syntax: "<length>"; inherits: false; initial-value: 500px; } @property --y2Point { syntax: "<length>"; inherits: false; initial-value: 300px; } body, html { width: 100%; height: 100%; display: flex; background: #000; } .wrap { position: relative; margin: auto; width: 1000px; height: 600px; background: conic-gradient(from -45deg at var(--xPoint) var(--yPoint), rgba(102, 255, 230, 0.7), transparent 50%, rgba(158, 190, 250, 0.5) 100%), conic-gradient(from 180deg at var(--x2Point) var(--y2Point), rgba(102, 255, 230, 0.7), transparent 50%, rgba(158, 190, 250, 0.5) 100%), linear-gradient(-45deg, #060d5e, #002268); -webkit-animation: pointMove 2.5s infinite alternate linear; animation: pointMove 2.5s infinite alternate linear; overflow: hidden; } .shadowTop { position: absolute; top: -300px; left: -330px; width: 430px; height: 300px; background: #fff; transform-origin: 100% 100%; transform: rotate(225deg); -webkit-clip-path: polygon(-100% 100%, 200% 100%, 200% 500%, -100% 500%); clip-path: polygon(-100% 100%, 200% 100%, 200% 500%, -100% 500%); box-shadow: 0px 0 0.5px #9cfcec, 0px 0 1px rgba(158, 250, 235, 0.95), 0px 0 2px rgba(158, 250, 236, 0.95), 0px 0 3px rgba(158, 250, 236, 0.95), 0px 0 4px rgba(167, 251, 238, 0.9), 0px 0 5px rgba(167, 251, 240, 0.9), 0px 0 10px rgba(177, 251, 243, 0.9), 0px 0 20px rgba(187, 252, 245, 0.85), 0px 0 40px rgba(187, 252, 246, 0.85), 0px 0 60px rgba(187, 252, 246, 0.85); -webkit-animation: scale 2.5s infinite alternate linear; animation: scale 2.5s infinite alternate linear; mix-blend-mode: hard-light; } .shadowBottom { position: absolute; top: 300px; left: 500px; width: 400px; height: 300px; background: #000; transform-origin: 0 100%; -webkit-clip-path: polygon(0 -100%, -200% -100%, -200% 200%, 0 200%); clip-path: polygon(0 -100%, -200% -100%, -200% 200%, 0 200%); box-shadow: 0px 0 0.5px #9cfcec, 0px 0 1px rgba(158, 250, 235, 0.95), 0px 0 2px rgba(158, 250, 236, 0.95), 0px 0 3px rgba(158, 250, 236, 0.95), 0px 0 4px rgba(167, 251, 238, 0.9), 0px 0 5px rgba(167, 251, 240, 0.9), 0px 0 10px rgba(177, 251, 243, 0.9), 0px 0 20px rgba(187, 252, 245, 0.85), 0px 0 40px rgba(187, 252, 246, 0.85), 0px 0 60px rgba(187, 252, 246, 0.85); -webkit-animation: scaleBottom 2.5s infinite -2.5s alternate linear; animation: scaleBottom 2.5s infinite -2.5s alternate linear; mix-blend-mode: hard-light; } @-webkit-keyframes scale { 50%, 100% { transform: rotate(225deg) scale(0); } } @keyframes scale { 50%, 100% { transform: rotate(225deg) scale(0); } } @-webkit-keyframes scaleBottom { 50%, 100% { transform: scale(0); } } @keyframes scaleBottom { 50%, 100% { transform: scale(0); } } @-webkit-keyframes pointMove { 0% { --x2Point: 500px; --y2Point: 600px; } 50% { --xPoint: 100px; --yPoint: 0; --x2Point: 500px; --y2Point: 600px; } 100% { --xPoint: 100px; --yPoint: 0; --x2Point: 500px; --y2Point: 300px; } } @keyframes pointMove { 0% { --x2Point: 500px; --y2Point: 600px; } 50% { --xPoint: 100px; --yPoint: 0; --x2Point: 500px; --y2Point: 600px; } 100% { --xPoint: 100px; --yPoint: 0; --x2Point: 500px; --y2Point: 300px; } } </style> <script> window.console = window.console || function (t) { }; </script> <script> if (document.location.search.match(/type=embed/gi)) { window.parent.postMessage("resize", "*"); } </script> </head> <body translate="no"> <div> <div></div> <div></div> </div> <div id="xl_chrome_ext_{4DB361DE-01F7-4376-B494-639E489D19ED}" style="display: none;"> <div></div> <a id="xl_chrome_ext_download" href="javascript:;">下载视频</a> <a id="xl_chrome_ext_close" href="javascript:;"></a> </div> </body> </html>
通过以上内容我们知道了css如何实现激光切割钢板的高级效果?感谢您访问“我爱捣鼓(www.woaidaogu.com)”网站的内容,希望对大家有所帮助!引用本文内容时,请注明出处!谢谢合作!