{"id":3502,"date":"2024-11-10T12:49:57","date_gmt":"2024-11-10T04:49:57","guid":{"rendered":"https:\/\/fwq.ai\/blog\/3502\/"},"modified":"2024-11-10T12:49:57","modified_gmt":"2024-11-10T04:49:57","slug":"%e5%a6%82%e4%bd%95%e6%a8%a1%e6%8b%9fwindows-10-%e8%ae%be%e7%bd%ae%e7%95%8c%e9%9d%a2%e4%b8%ad%e7%9a%84%e9%bc%a0%e6%a0%87%e6%82%ac%e6%b5%ae%e6%94%be%e5%a4%a7%e6%95%88%e6%9e%9c%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/3502\/","title":{"rendered":"\u5982\u4f55\u6a21\u62dfWindows 10 \u8bbe\u7f6e\u754c\u9762\u4e2d\u7684\u9f20\u6807\u60ac\u6d6e\u653e\u5927\u6548\u679c\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173104619016469.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u6a21\u62dfWindows 10 \u8bbe\u7f6e\u754c\u9762\u4e2d\u7684\u9f20\u6807\u60ac\u6d6e\u653e\u5927\u6548\u679c\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u6a21\u62dfWindows 10 \u8bbe\u7f6e\u754c\u9762\u4e2d\u7684\u9f20\u6807\u60ac\u6d6e\u653e\u5927\u6548\u679c\uff1f\u63d2\u56fe\" \/><\/p>\n<p>\u8bbe\u7f6e\u754c\u9762\u7684\u9f20\u6807\u79fb\u52a8\u663e\u793a\u5468\u8fb9\u7684\u6837\u5f0f\uff08\u63a2\u7167\u706f\u6548\u679c\uff09\u7684\u5b9e\u73b0\u65b9\u5f0f<\/p>\n<p>\u5728\u8bbe\u7f6e\u754c\u9762\u7684\u9f20\u6807\u60ac\u6d6e\u6548\u679c\u4e2d\uff0c\u5149\u6807\u5468\u56f4\u4f1a\u663e\u793a\u4e00\u4e2a\u653e\u5927\u533a\u57df\u3002\u5728\u524d\u7aef\u5f00\u53d1\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\u7c7b\u4f3c\u7684\u6548\u679c\u3002<\/p>\n<p><strong>\u4f7f\u7528<\/strong><\/p>\n<p>\u4f7f\u7528css\u7684transform\u548cbox-shadow\u5c5e\u6027\u3002\u901a\u8fc7\u5c06transform: scale(1.2);\u5e94\u7528\u4e8e\u60ac\u6d6e\u5143\u7d20\uff0c\u53ef\u4ee5\u653e\u5927\u5143\u7d20\u3002\u7136\u540e\uff0c\u4f7f\u7528box-shadow: 0 0 10px #ccc;\u5728\u5143\u7d20\u5468\u56f4\u6dfb\u52a0\u9634\u5f71\u3002<\/p>\n<p>\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<pre>.container {\n  height: 200px;\n  width: 200px;\n  background: #f00;\n}\n\n.container:hover {\n  transform: scale(1.2);\n  box-shadow: 0 0 10px #ccc;\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u4e0d\u4f7f\u7528css<\/strong><\/p>\n<p>\u5982\u679ccss\u4e0d\u53ef\u7528\u6216\u6548\u679c\u4e0d\u7406\u60f3\uff0c\u53ef\u4ee5\u4f7f\u7528javascript\u6216\u7b2c\u4e09\u65b9\u5e93\u3002<\/p>\n<p><strong>\u4f7f\u7528javascript<\/strong><\/p>\n<p>\u4f7f\u7528element.getboundingclientrect()\u83b7\u53d6\u60ac\u6d6e\u5143\u7d20\u7684\u77e9\u5f62\u8fb9\u754c\u3002\u7136\u540e\uff0c\u4f7f\u7528document.createelement()\u521b\u5efa\u65b0\u7684\u5143\u7d20\u4f5c\u4e3a\u906e\u7f69\u5c42\uff0c\u5e76\u5c06\u906e\u7f69\u5c42\u7684\u4f4d\u7f6e\u548c\u5927\u5c0f\u8bbe\u7f6e\u4e3a\u60ac\u6d6e\u5143\u7d20\u7684\u8fb9\u754c\u52a0\u4e0a\u504f\u79fb\u91cf\u3002<\/p>\n<p>\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<pre>const element = document.querySelector('.container');\n\nelement.addEventListener('mouseover', (e) =&gt; {\n  const rect = element.getBoundingClientRect();\n  const mask = document.createElement('div');\n  mask.style.position = 'absolute';\n  mask.style.top = rect.top - 10 + 'px';\n  mask.style.left = rect.left - 10 + 'px';\n  mask.style.width = rect.width + 20 + 'px';\n  mask.style.height = rect.height + 20 + 'px';\n  mask.style.background = '#ccc';\n  \n  document.body.appendChild(mask);\n});\n\nelement.addEventListener('mouseout', (e) =&gt; {\n  document.body.removeChild(mask);\n});<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93<\/strong><\/p>\n<p>\u53ef\u4ee5\u4f7f\u7528\u5982jquery ui\u7684library\u5b9e\u73b0\u7c7b\u4f3c\u6548\u679c\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e9b\u7c7b\u4f3c\u6548\u679c\u7684\u6f14\u793a\uff1a<\/p>\n<ul>\n<li>[windows 10 grid hover effect](https:\/\/codepen.io\/greensock\/pen\/yzwwwo)<\/li>\n<li>[windows 10 calendar effect css](https:\/\/codepen.io\/f3ll0wme\/pen\/kkyrwb)<\/li>\n<li>[windows 10 calendar effect using html,css,js](https:\/\/codepen.io\/jorenbley\/pen\/jjyjv)<\/li>\n<\/ul>\n<p>\u6559\u7a0b\uff1a<\/p>\n<ul>\n<li>[windows 10 calendar hover effect using html, css, and vanilla js](https:\/\/dev.to\/jorenbley\/windows-10-calendar-hover-effect-using-html-css-and-vanilla-js-45dp)<\/li>\n<li>[windows 10 grid hover effect using html, css, and vanilla js](https:\/\/www.jacekjeznach.com\/blog\/windows-10-grid-hover-effect-pure-javascript)<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u6a21\u62dfWindows 10 \u8bbe\u7f6e\u754c\u9762\u4e2d\u7684\u9f20\u6807\u60ac\u6d6e\u653e\u5927\u6548\u679c\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8bbe\u7f6e\u754c\u9762\u7684\u9f20\u6807\u79fb\u52a8\u663e\u793a\u5468\u8fb9\u7684\u6837\u5f0f\uff08\u63a2\u7167\u706f\u6548\u679c\uff09\u7684\u5b9e\u73b0\u65b9\u5f0f \u5728\u8bbe\u7f6e\u754c\u9762\u7684\u9f20\u6807\u60ac\u6d6e\u6548\u679c\u4e2d\uff0c\u5149\u6807\u5468\u56f4\u4f1a\u663e\u793a\u4e00\u4e2a\u653e\u5927\u533a\u57df\u3002\u5728\u524d\u7aef\u5f00\u53d1\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\u7c7b\u4f3c\u7684\u6548\u679c\u3002 \u4f7f\u7528 \u4f7f\u7528css\u7684transform\u548cbox-shadow\u5c5e\u6027\u3002\u901a\u8fc7\u5c06transform: scale(1.2);\u5e94\u7528\u4e8e\u60ac\u6d6e\u5143\u7d20\uff0c\u53ef\u4ee5\u653e\u5927\u5143\u7d20\u3002\u7136\u540e\uff0c\u4f7f\u7528box-shadow: 0 0 10px #ccc;\u5728\u5143\u7d20\u5468\u56f4\u6dfb\u52a0\u9634\u5f71\u3002 \u793a\u4f8b\u4ee3\u7801\uff1a .container { height: 200px; width: 200px; background: #f00; } .container:hover { transform: scale(1.2); box-shadow: 0 0 10px #ccc; } \u767b\u5f55\u540e\u590d\u5236 \u4e0d\u4f7f\u7528css \u5982\u679ccss\u4e0d\u53ef\u7528\u6216\u6548\u679c\u4e0d\u7406\u60f3\uff0c\u53ef\u4ee5\u4f7f\u7528javascript\u6216\u7b2c\u4e09\u65b9\u5e93\u3002 \u4f7f\u7528javascript \u4f7f\u7528element.getboundingclientrect()\u83b7\u53d6\u60ac\u6d6e\u5143\u7d20\u7684\u77e9\u5f62\u8fb9\u754c\u3002\u7136\u540e\uff0c\u4f7f\u7528document.createelement()\u521b\u5efa\u65b0\u7684\u5143\u7d20\u4f5c\u4e3a\u906e\u7f69\u5c42\uff0c\u5e76\u5c06\u906e\u7f69\u5c42\u7684\u4f4d\u7f6e\u548c\u5927\u5c0f\u8bbe\u7f6e\u4e3a\u60ac\u6d6e\u5143\u7d20\u7684\u8fb9\u754c\u52a0\u4e0a\u504f\u79fb\u91cf\u3002 \u793a\u4f8b\u4ee3\u7801\uff1a const element = document.querySelector(&#8216;.container&#8217;); element.addEventListener(&#8216;mouseover&#8217;, (e) =&gt; { const rect = element.getBoundingClientRect(); const mask = document.createElement(&#8216;div&#8217;); mask.style.position = &#8216;absolute&#8217;; mask.style.top [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-3502","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3502","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=3502"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3502\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=3502"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=3502"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=3502"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}