p5实现超级射线发散多边形效果
代码语言:html
所属分类:布局界面
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> html, body { margin: 0; padding: 0; height: 100%; width: 100%; background-color: black; overflow: hidden; } #background-canvas { position: absolute; height: 100%; width: 100%; } .splash { position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; z-index: 9999; background: #000000; display: block; } .box { position: absolute; width: 78px; height: 78px; left: 50%; top: 50%; margin-left: -39px; margin-top: -39px; } .loading:before { content: ""; position: absolute; width: 35px; height: 35px; top: 50%; margin-top: -18px; left: 50%; margin-left: -18px; border-width: 2px 1px; border-style: solid; border-color: rgb(255, 255, 255) rgba(247, 247, 247, 0.3); border-radius: 50%; -o-border-radius: 50%; -ms-border-radius: 50%; -webkit-border-radius: 50%; -moz-border-radius: 50%; box-sizing: border-box; -o-box-sizing: border-box; -ms-box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; animation: spin 3.45s infinite; -o-animation: spin 3.45s infinite; -ms-animation: spin 3.45s infinite; -webkit-animation: spin 3.45s infinite; -moz-animation: spin 3.45s infinite; } .loading:after { content: ""; position: absolute; width: 6px; height: 6px; top: 50%; margin-top: -3px; left: 50%; margin-left: -3px; background-color: rgb(255, 255, 255); border-radius: 50%; -o-border-radius: 50%; -ms-border-radius: 50%; -webkit-border-radius: 50%; -moz-border-radius: 50%; box-sizing: border-box; -o-box-sizing: border-box; -ms-box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; animation: pulse 6.9s infinite, borderPulse 6.9s infinite; -o-animation: pulse 6.9s infinite, borderPulse 6.9s infinite; -ms-animation: pulse 6.9s infinite, borderPulse 6.9s infinite; -webkit-animation: pulse 6.9s infinite, borderPulse 6.9s infinite; -moz-animation: pulse 6.9s infinite, borderPulse 6.9s infinite; } /* Splash animations */ @keyframes spin { 0% { transform: rotate(0deg); } 50% { transform: rotate(360deg); } 100% { transform: rotate(1080deg); } } @-o-keyframes spin { 0% { -o-transform: rotate(0deg); } 50% { -o-transform: rotate(360deg); } 100% { -o-transform: rotate(1080deg); } } @-ms-keyframes spin { 0% { -ms-transform: rotate(0deg); } 50% { -ms-transform: rotate(360deg); } 100% { -ms-transform: rotate(1080deg); } } @-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg); } 50% { -webkit-transform: rotate(360deg); } 100% { -webkit-transform: rotate(1080deg); } } @-moz-keyframes spin { 0% { -moz-transform: rotate(0deg); } 50% { -moz-transform: rotate(360deg); } 100% { -moz-transform: rotate(1080deg); } } @keyframes pulse { 0% { background-color: rgba(232, 232, 232, 0.2); } 13% { background-color: rgba(240, 240, 240, 0.2); } 15% { background-color: rgba(255, 255, 255, 0.9); } 28% { background-color: rgba(222, 222, 222, 0.9); } 30% { background-color: rgba(255, 255, 255, 0.2); } 43% { background-color: rgba(240, 240, 240, 0.2); } 45% { background-color: rgba(245, 245, 245, 0.9); } 70% { background-color: rgba(250, 250, 250, 0.9); } 74% { background-color: rgba(255, 255, 255, 0.2); } 100% { background-color: rgba(242, 242, 242, 0.9); } } @-o-keyframes pulse { 0% { background-color: rgba(232, 232, 232, 0.2); } 13% { background-color: rgba(240, 240, 240, 0.2); } 15% { background-color: rgba(255, 255, 255, 0.9); } 28% { background-color: rgba(222, 222, 222, 0.9); } 30% { background-color: rgba(255, 255, 255, 0.2); } 43% { background-color: rgba(240, 240, 240, 0.2); } 45% { background-color: rgba(245, 245, 245, 0.9); } 70% { background-color: rgba(250, 250, 250, 0.9); } 74% { background-color: rgba(255, 255, 255, 0.2); } 100% { background-color: rgba(242, 242, 242, 0.9); } } @-ms-keyframes pulse { 0% { background-color: rgba(232, 232, 232, 0.2); } 13% { background-color: rgba(240, 240, 240, 0.2); } 15% { background-color: rgba(255, 255, 255, 0.9); } 28% { background-color: rgba(222, 222, 222, 0.9); } 30% { background-color: rgba(255, 255, 255, 0.2); } 43% { background-color: rgba(240, 240, 240, 0.2); } 45% { background-color: rgba(245, 245, 245, 0.9); } 70% { background-color: rgba(250, 250, 250, 0.9); } 74% { background-color: rgba(255, 255, 255, 0.2); } 100% { background-color: rgba(242, 242, 242, 0.9); } } @-webkit-keyframes pulse { 0% { background-color: rgba(232, 232, 232, 0.2); } 13% { background-color: rgba(240, 240, 240, 0.2); } 15% { background-color: rgba(255, 255.........完整代码请登录后点击上方下载按钮下载查看
网友评论0