这一期HTML好玩代码合集是动态烟花文字,是本期里最好玩的一个HTML代码(把文字可以改成表白的),先看效果:
这个效果是动态的,那些数字都是有烟花堆积成的,代码在哪里呢?
在这里:
<!DOCTYPE html>
<html lang="en">
<script>var _hmt = _hmt || [];(function () {var hm = document.createElement("script");hm.src = "https://hm.baidu.com/hm.js?c923daf3182a4b0ce01878475080aadc";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(hm, s);})();
</script><head><meta charset="UTF-8"><title>我爱你一生一世</title>
</head>
<style>body {margin: 0;overflow: hidden;background: black;}canvas {position: absolute;}
</style><body><canvas></canvas><canvas></canvas><canvas></canvas><script>function GetRequest() {var url = decodeURI(location.search); //获取url中"?"符后的字串var theRequest = new Object();if (url.indexOf("?") != -1) {var str = url.substr(1);strs = str.split("&");for (var i = 0; i < strs.length; i++) {theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);}}return theRequest;}class Shard {constructor(x, y, hue)