{"id":6578,"date":"2026-05-17T00:51:22","date_gmt":"2026-05-16T15:51:22","guid":{"rendered":"https:\/\/route-zero.com\/recruit\/?post_type=route&#038;p=6578"},"modified":"2026-11-17T00:51:33","modified_gmt":"2026-11-16T15:51:33","slug":"html-popover-popovertarget","status":"publish","type":"route","link":"https:\/\/route-zero.com\/recruit\/route\/6578\/","title":{"rendered":"HTML popover\u5c5e\u6027\u3067JavaScript\u306a\u3057\u306e\u30dd\u30c3\u30d7\u30aa\u30fc\u30d0\u30fc\u3092\u4f5c\u308b"},"content":{"rendered":"<p>HTML\u306epopover\u5c5e\u6027\u3092\u4f7f\u3046\u3068\u3001\u30e1\u30cb\u30e5\u30fc\u3084\u88dc\u8db3\u60c5\u5831\u306e\u3088\u3046\u306a\u975e\u30e2\u30fc\u30c0\u30eb\u8868\u793a\u3092\u3001\u307e\u305a\u306fJavaScript\u3092\u66f8\u304b\u305a\u306b\u4f5c\u308c\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001popover\u3068popovertarget\u306e\u6700\u5c0f\u69cb\u6210\u304b\u3089\u3001auto\u3068manual\u306e\u9055\u3044\u3001\u4f7f\u3046\u3068\u304d\u306e\u6ce8\u610f\u70b9\u307e\u3067\u521d\u5fc3\u8005\u5411\u3051\u306b\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<h2>Popover API\u3068\u306f<\/h2>\n<p>Popover API\u306f\u3001\u30da\u30fc\u30b8\u4e0a\u306e\u4ed6\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3088\u308a\u624b\u524d\u306b\u4e00\u6642\u7684\u306a\u5185\u5bb9\u3092\u8868\u793a\u3059\u308b\u305f\u3081\u306eWeb\u6a19\u6e96\u3067\u3059\u3002HTML\u8981\u7d20\u306bpopover\u5c5e\u6027\u3092\u4ed8\u3051\u308b\u3068\u3001\u305d\u306e\u8981\u7d20\u306f\u901a\u5e38\u6642\u306f\u975e\u8868\u793a\u306b\u306a\u308a\u3001\u8868\u793a\u6642\u306b\u306ftop layer\u3068\u547c\u3070\u308c\u308b\u524d\u9762\u30ec\u30a4\u30e4\u30fc\u306b\u914d\u7f6e\u3055\u308c\u307e\u3059\u3002<\/p>\n<blockquote>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u975e\u30e2\u30fc\u30c0\u30eb<\/strong><br \/>\u8868\u793a\u4e2d\u3067\u3082\u30da\u30fc\u30b8\u306e\u4ed6\u306e\u90e8\u5206\u3092\u64cd\u4f5c\u3067\u304d\u308bUI\u3067\u3059\u3002\u30da\u30fc\u30b8\u5168\u4f53\u306e\u64cd\u4f5c\u3092\u6b62\u3081\u308b\u5fc5\u8981\u304c\u3042\u308b\u78ba\u8a8d\u753b\u9762\u306a\u3069\u306f\u3001popover\u3067\u306f\u306a\u304fdialog\u8981\u7d20\u306e\u5229\u7528\u3092\u691c\u8a0e\u3057\u307e\u3059\u3002<\/p>\n<\/blockquote>\n<hr>\n<h2>JavaScript\u306a\u3057\u306e\u6700\u5c0f\u5b9f\u88c5<\/h2>\n<p>\u8868\u793a\u3059\u308b\u8981\u7d20\u306bpopover\u3068id\u3092\u4ed8\u3051\u3001\u958b\u9589\u30dc\u30bf\u30f3\u306bpopovertarget\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002popovertarget\u306e\u5024\u306f\u3001\u958b\u9589\u3057\u305f\u3044popover\u8981\u7d20\u306eid\u3068\u540c\u3058\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre><code>&lt;button type=&quot;button&quot; popovertarget=&quot;help-popover&quot;&gt;\r\n  \u88dc\u8db3\u3092\u898b\u308b\r\n&lt;\/button&gt;\r\n\r\n&lt;div id=&quot;help-popover&quot; popover&gt;\r\n  &lt;p&gt;\u3053\u306e\u8aac\u660e\u306f\u30dd\u30c3\u30d7\u30aa\u30fc\u30d0\u30fc\u3067\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002&lt;\/p&gt;\r\n&lt;\/div&gt;<\/code><\/pre>\n<p>popovertargetaction\u3092\u7701\u7565\u3057\u305f\u5834\u5408\u3001\u30dc\u30bf\u30f3\u306f\u5bfe\u8c61\u3092\u8868\u793a\u30fb\u975e\u8868\u793a\u306b\u5207\u308a\u66ff\u3048\u308btoggle\u3068\u3057\u3066\u52d5\u4f5c\u3057\u307e\u3059\u3002\u307e\u305a\u306f\u3053\u306e\u6700\u5c0f\u69cb\u6210\u3067\u3001\u958b\u304f\u30fb\u9589\u3058\u308b\u52d5\u4f5c\u3092\u78ba\u8a8d\u3059\u308b\u3068\u7406\u89e3\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<hr>\n<h2>popover=auto\u306e\u57fa\u672c\u52d5\u4f5c<\/h2>\n<p>\u5024\u3092\u4ed8\u3051\u305a\u306bpopover\u3068\u3060\u3051\u66f8\u304f\u3068\u3001popover=auto\u3068\u540c\u3058\u6271\u3044\u306b\u306a\u308a\u307e\u3059\u3002auto\u3067\u306f\u3001\u5916\u5074\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u308aEsc\u30ad\u30fc\u3067\u9589\u3058\u305f\u308a\u3067\u304d\u308blight dismiss\u304c\u5229\u7528\u3067\u304d\u3001\u901a\u5e38\u306f\u540c\u6642\u306b\u8868\u793a\u3055\u308c\u308bauto popover\u306f1\u3064\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u5c5e\u6027\u3060\u3051\u306epopover\u306fauto\u3068\u3057\u3066\u6271\u308f\u308c\u308b<\/li>\n<li>\u5916\u5074\u306e\u30af\u30ea\u30c3\u30af\u3084Esc\u30ad\u30fc\u3067\u9589\u3058\u3089\u308c\u308b<\/li>\n<li>\u5225\u306eauto popover\u3092\u958b\u304f\u3068\u3001\u901a\u5e38\u306f\u5148\u306b\u958b\u3044\u3066\u3044\u305f\u3082\u306e\u304c\u9589\u3058\u308b<\/li>\n<li>\u30dc\u30bf\u30f3\u5074\u3067popovertargetaction=show \/ hide \/ toggle\u3092\u6307\u5b9a\u3067\u304d\u308b<\/li>\n<\/ul>\n<hr>\n<h2>auto\u3068manual\u306e\u4f7f\u3044\u5206\u3051<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u6307\u5b9a<\/th>\n<th>\u4e3b\u306a\u52d5\u4f5c<\/th>\n<th>\u5411\u3044\u3066\u3044\u308b\u5834\u9762<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>popover=auto<\/td>\n<td>light dismiss\u3042\u308a\u3002\u901a\u5e38\u306f1\u3064\u305a\u3064\u8868\u793a<\/td>\n<td>\u30e1\u30cb\u30e5\u30fc\u3001\u88dc\u8db3\u3001\u7c21\u6613\u30d4\u30c3\u30ab\u30fc<\/td>\n<\/tr>\n<tr>\n<td>popover=manual<\/td>\n<td>\u81ea\u52d5\u3067\u306f\u9589\u3058\u305a\u3001\u660e\u793a\u7684\u306a\u64cd\u4f5c\u3067\u958b\u9589<\/td>\n<td>\u8907\u6570\u3092\u72ec\u7acb\u3057\u3066\u6b8b\u3057\u305f\u3044\u8868\u793a<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6700\u521d\u306fauto\u304b\u3089\u8a66\u3059\u306e\u304c\u5206\u304b\u308a\u3084\u3059\u3044\u3067\u3059\u3002\u8907\u6570\u306e\u8868\u793a\u3092\u540c\u6642\u306b\u6b8b\u3057\u305f\u3044\u306a\u3069\u3001auto\u306e\u81ea\u52d5\u7684\u306a\u9589\u3058\u65b9\u304c\u7528\u9014\u306b\u5408\u308f\u306a\u3044\u5834\u5408\u306bmanual\u3092\u691c\u8a0e\u3057\u307e\u3059\u3002<\/p>\n<h2>\u521d\u5fc3\u8005\u304c\u78ba\u8a8d\u3057\u305f\u3044\u6ce8\u610f\u70b9<\/h2>\n<ol>\n<li>\u958b\u9589\u30dc\u30bf\u30f3\u306b\u306fbutton\u8981\u7d20\u3092\u4f7f\u3044\u3001\u4f55\u3092\u958b\u304f\u30dc\u30bf\u30f3\u306a\u306e\u304b\u5206\u304b\u308b\u6587\u8a00\u306b\u3059\u308b<\/li>\n<li>popovertarget\u306e\u5024\u3068popover\u8981\u7d20\u306eid\u304c\u4e00\u81f4\u3057\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3059\u308b<\/li>\n<li>\u30e2\u30fc\u30c0\u30eb\u306a\u78ba\u8a8d\u753b\u9762\u304c\u5fc5\u8981\u306a\u3089dialog\u8981\u7d20\u3068\u306e\u9055\u3044\u3092\u78ba\u8a8d\u3059\u308b<\/li>\n<li>\u53e4\u3044\u30d6\u30e9\u30a6\u30b6\u30fc\u3084\u7aef\u672b\u3082\u5bfe\u8c61\u306a\u3089\u4e92\u63db\u6027\u3092\u78ba\u8a8d\u3057\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u4ee3\u66ffUI\u3092\u7528\u610f\u3059\u308b<\/li>\n<li>\u8907\u96d1\u306a\u5165\u308c\u5b50\u3084\u591a\u6570\u306epopover\u306b\u9032\u3080\u524d\u306b\u3001\u307e\u305a1\u3064\u306e\u6700\u5c0f\u69cb\u6210\u3067\u30ad\u30fc\u30dc\u30fc\u30c9\u64cd\u4f5c\u307e\u3067\u78ba\u8a8d\u3059\u308b<\/li>\n<\/ol>\n<p>HTML\u6a19\u6e96\u306e\u6a5f\u80fd\u3092\u4f7f\u3046\u3068\u3001\u72ec\u81eaJavaScript\u3067\u958b\u9589\u72b6\u614b\u3092\u4e00\u304b\u3089\u7ba1\u7406\u3059\u308b\u524d\u306b\u3001\u30d6\u30e9\u30a6\u30b6\u30fc\u304c\u63d0\u4f9b\u3059\u308b\u57fa\u672c\u52d5\u4f5c\u3092\u5229\u7528\u3067\u304d\u307e\u3059\u3002\u7528\u9014\u306b\u5408\u3046\u304b\u3092\u5c0f\u3055\u304f\u8a66\u3057\u3066\u304b\u3089\u5e83\u3052\u308b\u306e\u304c\u5b89\u5168\u3067\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>popover\u3068popovertarget\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3068\u3001JavaScript\u306a\u3057\u3067\u3082\u57fa\u672c\u7684\u306a\u30dd\u30c3\u30d7\u30aa\u30fc\u30d0\u30fc\u3092\u4f5c\u308c\u307e\u3059\u3002\u6700\u521d\u306fauto\u306e\u6700\u5c0f\u69cb\u6210\u3092\u8a66\u3057\u3001\u5916\u5074\u30af\u30ea\u30c3\u30af\u3084Esc\u30ad\u30fc\u3067\u306e\u9589\u3058\u65b9\u3001\u30dc\u30bf\u30f3\u3068\u306e\u7d10\u4ed8\u3051\u3092\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>HTML\u306e\u65b0\u3057\u3044\u6a5f\u80fd\u3092\u5b66\u3076\u3068\u304d\u306f\u3001\u307e\u305a\u6700\u5c0f\u30b3\u30fc\u30c9\u3092\u30d6\u30e9\u30a6\u30b6\u30fc\u3067\u52d5\u304b\u3057\u3001\u6a19\u6e96\u306e\u6319\u52d5\u3092\u78ba\u8a8d\u3057\u3066\u304b\u3089JavaScript\u306b\u3088\u308b\u62e1\u5f35\u3092\u8db3\u3057\u3066\u3044\u304f\u3068\u7406\u89e3\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"featured_media":6581,"template":"","_links":{"self":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route\/6578"}],"collection":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route"}],"about":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/types\/route"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/media\/6581"}],"wp:attachment":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/media?parent=6578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}