{"id":5268,"date":"2023-09-22T20:56:41","date_gmt":"2023-09-22T11:56:41","guid":{"rendered":"https:\/\/www.lining-moon.casa\/andplus.co.jp\/?p=5268"},"modified":"2026-01-08T11:12:55","modified_gmt":"2026-01-08T02:12:55","slug":"post-5268","status":"publish","type":"post","link":"https:\/\/code-plus.jp\/gp\/post-5268\/","title":{"rendered":"\u540c\u30da\u30fc\u30b8\u5185\u306e\u30a2\u30f3\u30ab\u30fc\u30ea\u30f3\u30af\u306b\u306f\u30b9\u30e0\u30fc\u30b9\u30b9\u30af\u30ed\u30fc\u30eb\u3001\u7570\u306a\u308b\u30da\u30fc\u30b8\u3078\u306e\u30ea\u30f3\u30af\u306b\u306f\u901a\u5e38\u306e\u30ea\u30f3\u30af\u306e\u52d5\u4f5c\u3092\u3055\u305b\u308b\u65b9\u6cd5"},"content":{"rendered":"<h2>\u30b9\u30e0\u30fc\u30b9\u30b9\u30af\u30ed\u30fc\u30eb\u30ea\u30f3\u30af\u3068\u901a\u5e38\u30ea\u30f3\u30af\u306e\u81ea\u52d5\u5224\u5225\u3068\u30a8\u30d5\u30a7\u30af\u30c8\u8ffd\u52a0\u65b9\u6cd5<\/h2>\n<p>\u30a6\u30a7\u30d6\u30da\u30fc\u30b8\u5185\u3067\u306e\u30b9\u30e0\u30fc\u30b9\u30b9\u30af\u30ed\u30fc\u30eb\u30ea\u30f3\u30af\u306f\u30e6\u30fc\u30b6\u30fc\u30a8\u30af\u30b9\u30da\u30ea\u30a8\u30f3\u30b9\u306e\u5411\u4e0a\u306b\u8ca2\u732e\u3057\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u5916\u90e8\u30da\u30fc\u30b8\u3078\u306e\u30ea\u30f3\u30af\u3084\u3001\u7570\u306a\u308b\u30da\u30fc\u30b8\u5185\u306e\u30a2\u30f3\u30ab\u30fc\u30ea\u30f3\u30af\u3067\u306f\u30b9\u30e0\u30fc\u30b9\u30b9\u30af\u30ed\u30fc\u30eb\u3092\u9069\u7528\u3059\u308b\u3053\u3068\u304c\u56f0\u96e3\u3067\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u540c\u3058\u30da\u30fc\u30b8\u5185\u306e\u30ea\u30f3\u30af\u306b\u81ea\u52d5\u3067\u30b9\u30e0\u30fc\u30b9\u30b9\u30af\u30ed\u30fc\u30eb\u3092\u9069\u7528\u3057\u3001\u7570\u306a\u308b\u30da\u30fc\u30b8\u3078\u306e\u30ea\u30f3\u30af\u306b\u306f\u901a\u5e38\u306e\u30ea\u30f3\u30af\u3068\u3057\u3066\u52d5\u4f5c\u3055\u305b\u308b\u65b9\u6cd5\u3001\u3055\u3089\u306b\u30ea\u30f3\u30af\u79fb\u52d5\u4e2d\u306b\u30a8\u30d5\u30a7\u30af\u30c8\u3092\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n\n<h3>1. URL\u5224\u5b9a\u306b\u3088\u308b\u30b9\u30e0\u30fc\u30b9\u30b9\u30af\u30ed\u30fc\u30eb\u306e\u9069\u7528<\/h3>\n<p>\u307e\u305a\u3001\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u30ea\u30f3\u30af\u304c\u73fe\u5728\u306e\u30da\u30fc\u30b8\u306e\u30a2\u30f3\u30ab\u30fc\u3078\u306e\u30ea\u30f3\u30af\u3067\u3042\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n<pre class=\"language-javascript\"><code>\nconst link = document.querySelector('a');\n\nlink.addEventListener('click', function(event) {\n  if (location.pathname.replace(\/^\\\/\/, '') == this.pathname.replace(\/^\\\/\/, '') \n      &amp;&amp; location.hostname == this.hostname) {\n      event.preventDefault();\n      \/\/ \u3053\u3053\u306b\u30b9\u30e0\u30fc\u30b9\u30b9\u30af\u30ed\u30fc\u30eb\u306e\u51e6\u7406\u3092\u66f8\u304f\n  }\n});\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n\n<h3>2. \u30ea\u30f3\u30af\u79fb\u52d5\u4e2d\u306e\u30a8\u30d5\u30a7\u30af\u30c8\u306e\u8ffd\u52a0<\/h3>\n<p>\u6b21\u306b\u3001\u30ea\u30f3\u30af\u304c\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u969b\u306b\u7279\u5b9a\u306e\u30a8\u30d5\u30a7\u30af\u30c8\uff08\u4f8b: \u30d5\u30a7\u30fc\u30c9\u30a2\u30a6\u30c8\uff09\u3092\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n\n<h4>HTML:<\/h4>\n<pre class=\"language-html\"><code>\n&lt;div id=\"fade-overlay\">&lt;\/div>\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n\n<h4>CSS:<\/h4>\n<pre class=\"language-css\"><code>\n#fade-overlay {\n  position: fixed;\n  top: 0; left: 0; right: 0; bottom: 0;\n  background-color: #000;\n  opacity: 0;\n  pointer-events: none;\n  z-index: 9999;\n  transition: opacity 0.3s;\n}\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n\n<h4>JavaScript:<\/h4>\n<pre class=\"language-javascript\"><code>\nconst fadeOverlay = document.getElementById('fade-overlay');\nfadeOverlay.style.opacity = 1;\n\/\/ \u4e00\u5b9a\u6642\u9593\u5f8c\u306b\u30aa\u30fc\u30d0\u30fc\u30ec\u30a4\u3092\u900f\u660e\u306b\u3059\u308b\nsetTimeout(() =&gt; {\n  fadeOverlay.style.opacity = 0;\n}, 700);\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n\n<h3>3. \u307e\u3068\u3081<\/h3>\n<p>\u3053\u306e\u65b9\u6cd5\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u30da\u30fc\u30b8\u5185\u306e\u30ea\u30f3\u30af\u306b\u306f\u30b9\u30e0\u30fc\u30b9\u30b9\u30af\u30ed\u30fc\u30eb\u3092\u3001\u5916\u90e8\u30da\u30fc\u30b8\u3084\u7570\u306a\u308b\u30da\u30fc\u30b8\u3078\u306e\u30ea\u30f3\u30af\u306b\u306f\u901a\u5e38\u306e\u30ea\u30f3\u30af\u306e\u52d5\u4f5c\u3092\u81ea\u52d5\u3067\u9069\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3055\u3089\u306b\u3001\u30ea\u30f3\u30af\u79fb\u52d5\u6642\u306b\u30a8\u30d5\u30a7\u30af\u30c8\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002\u3053\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u30a6\u30a7\u30d6\u30da\u30fc\u30b8\u306e\u5236\u4f5c\u3084\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u304c\u5927\u5e45\u306b\u7c21\u5358\u306b\u306a\u308a\u307e\u3059\u3002<\/p>","protected":false},"excerpt":{"rendered":"\u30b9\u30e0\u30fc\u30b9\u30b9\u30af\u30ed\u30fc\u30eb\u30ea\u30f3\u30af\u3068\u901a\u5e38\u30ea\u30f3\u30af\u306e\u81ea\u52d5\u5224\u5225\u3068\u30a8\u30d5\u30a7\u30af\u30c8\u8ffd\u52a0\u65b9\u6cd5 \u30a6\u30a7\u30d6\u30da\u30fc\u30b8\u5185\u3067\u306e\u30b9\u30e0\u30fc\u30b9\u30b9\u30af\u30ed\u30fc\u30eb\u30ea\u30f3\u30af\u306f\u30e6\u30fc\u30b6\u30fc\u30a8\u30af\u30b9\u30da\u30ea\u30a8\u30f3\u30b9\u306e\u5411\u4e0a\u306b\u8ca2\u732e\u3057\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u5916\u90e8\u30da\u30fc\u30b8\u3078\u306e\u30ea\u30f3\u30af\u3084\u3001\u7570\u306a\u308b\u30da\u30fc\u30b8\u5185\u306e\u30a2\u30f3\u30ab\u30fc\u30ea\u30f3\u30af\u3067[...]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","footnotes":"","vk-ltc-link":"","vk-ltc-target":""},"categories":[12],"tags":[],"group":[],"class_list":["post-5268","post","type-post","status-publish","format-standard","category-javascript"],"acf":[],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/posts\/5268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/comments?post=5268"}],"version-history":[{"count":0,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/posts\/5268\/revisions"}],"wp:attachment":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/media?parent=5268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/categories?post=5268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/tags?post=5268"},{"taxonomy":"group","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/group?post=5268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}