黄子涵

摘要: 问题 如图所示 答案 相关源码: #article-menus{ position: sticky; top: 0; box-shadow: 0 2px 6px rgba(0, 0, 0, .1); border-radius: 3px; padding: 15px; width: 300px; t 阅读全文
posted @ 2022-07-12 17:06 黄子涵 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 问题 如题所示 答案 相关源码: !function (e, t, a) { function n() { c( " .heart{ width: 10px; height: 10px; position: fixed; background: #f00; transform: rotate(45d 阅读全文
posted @ 2022-07-12 16:30 黄子涵 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 问题 如题所示 function r() { for (var e = 0; e < d.length; e++) d[e].alpha <= 0 ? (t.body.removeChild(d[e].el), d.splice(e, 1)) : ( d[e].y--, d[e].scale += 阅读全文
posted @ 2022-07-12 15:10 黄子涵 阅读(1106) 评论(0) 推荐(0) 编辑
摘要: 问题 如题所示 答案 相关源码: for (var e = 0; e < d.length; e++) d[e].alpha <= 0 ? (t.body.removeChild(d[e].el), d.splice(e, 1)) : ( d[e].y--, d[e].scale += .004, 阅读全文
posted @ 2022-07-12 15:07 黄子涵 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 问题 如题所示 相关源码: e.requestAnimationFrame = function () { return e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame || 阅读全文
posted @ 2022-07-12 10:22 黄子涵 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 问题 如题所示 相关源码: function o() { var t = "function" == typeof e.onclick && e.onclick; e.onclick = function (e) { t && t(), i(e) } } 答案 var t = "function" 阅读全文
posted @ 2022-07-12 08:44 黄子涵 阅读(783) 评论(0) 推荐(0) 编辑
摘要: 问题 如题所示 答案 相关源码: d.push({ el: a, x: e.clientX - 5, y: e.clientY - 5, scale: 1, alpha: 1, color: s() }), CSS设置Alpha值 alpha: 1这个样式的作用是设置元素的不透明度,样式值为1是就是 阅读全文
posted @ 2022-07-12 08:37 黄子涵 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 问题 如题所示 相关源码: function s() { return "rgb(" + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + ")" } 答案 这个函数就是 阅读全文
posted @ 2022-07-12 08:22 黄子涵 阅读(1086) 评论(0) 推荐(0) 编辑
摘要: 问题 如题所示 答案 相关源码: function i(e) { var a = t.createElement("div"); a.className = "heart", d.push({ el: a, x: e.clientX - 5, y: e.clientY - 5, scale: 1, 阅读全文
posted @ 2022-07-12 07:29 黄子涵 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 问题 如题所示 相关源码: function c(e) { var a = t.createElement("style"); a.type = "text/css"; try { a.appendChild(t.createTextNode(e)) } catch (t) { a.styleShe 阅读全文
posted @ 2022-07-12 06:54 黄子涵 阅读(100) 评论(0) 推荐(0) 编辑