{"id":6591,"date":"2026-04-19T15:16:21","date_gmt":"2026-04-19T06:16:21","guid":{"rendered":"https:\/\/route-zero.com\/recruit\/?post_type=route&#038;p=6591"},"modified":"2026-11-19T15:16:28","modified_gmt":"2026-11-19T06:16:28","slug":"css-anchor-positioning-tooltip","status":"publish","type":"route","link":"https:\/\/route-zero.com\/recruit\/route\/6591\/","title":{"rendered":"CSS Anchor Positioning\u3067\u30c4\u30fc\u30eb\u30c1\u30c3\u30d7\u3092\u914d\u7f6e\u3059\u308b"},"content":{"rendered":"<p>\u30c4\u30fc\u30eb\u30c1\u30c3\u30d7\u3084\u5439\u304d\u51fa\u3057\u3092\u57fa\u6e96\u30dc\u30bf\u30f3\u306e\u8fd1\u304f\u3078\u7f6e\u304d\u305f\u3044\u3068\u304d\u3001CSS Anchor Positioning\u3092\u4f7f\u3046\u3068\u3001JavaScript\u3067\u5ea7\u6a19\u3092\u6e2c\u3089\u305a\u306b\u8981\u7d20\u540c\u58eb\u3092\u95a2\u9023\u4ed8\u3051\u3066\u914d\u7f6e\u3067\u304d\u307e\u3059\u3002\u57fa\u672c\u306f\u3001\u57fa\u6e96\u5074\u306banchor-name\u3001\u914d\u7f6e\u3059\u308b\u5074\u306bposition-anchor\u3092\u6307\u5b9a\u3057\u3001anchor()\u95a2\u6570\u3067\u4f4d\u7f6e\u3092\u6c7a\u3081\u308b\u6d41\u308c\u3067\u3059\u3002\u65b0\u3057\u3044CSS\u6a5f\u80fd\u306a\u306e\u3067\u3001\u53e4\u3044\u30d6\u30e9\u30a6\u30b6\u30fc\u5411\u3051\u306e\u30d5\u30a9\u30fc\u30eb\u30d0\u30c3\u30af\u3082\u7528\u610f\u3057\u3066\u4f7f\u3044\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>CSS Anchor Positioning\u3068\u306f\uff1f<\/h2>\n<p>CSS Anchor Positioning\u306f\u3001\u3042\u308b\u8981\u7d20\u3092\u300c\u57fa\u6e96\u3068\u306a\u308b\u30a2\u30f3\u30ab\u30fc\u300d\u3068\u3057\u3066\u767b\u9332\u3057\u3001\u5225\u306eposition\u6307\u5b9a\u8981\u7d20\u3092\u305d\u306e\u4f4d\u7f6e\u3084\u5927\u304d\u3055\u306b\u5408\u308f\u305b\u3066\u914d\u7f6e\u3059\u308b\u4ed5\u7d44\u307f\u3067\u3059\u3002\u30c4\u30fc\u30eb\u30c1\u30c3\u30d7\u3001\u5439\u304d\u51fa\u3057\u3001\u30e1\u30cb\u30e5\u30fc\u3001\u30e9\u30d9\u30eb\u306a\u3069\u3001\u57fa\u6e96\u8981\u7d20\u306e\u8fd1\u304f\u3078\u5225\u8981\u7d20\u3092\u7f6e\u304d\u305f\u3044\u5834\u9762\u3067\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<blockquote>\n<p><strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30a2\u30f3\u30ab\u30fc\uff08anchor\uff09<\/strong><br \/>\u4f4d\u7f6e\u6c7a\u3081\u306e\u57fa\u6e96\u306b\u3059\u308b\u8981\u7d20\u3067\u3059\u3002CSS\u3067\u306fanchor-name\u3067\u540d\u524d\u3092\u4ed8\u3051\u3001\u5225\u306e\u8981\u7d20\u304b\u3089position-anchor\u3084anchor()\u3067\u53c2\u7167\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/blockquote>\n<table>\n<thead>\n<tr>\n<th>\u5f79\u5272<\/th>\n<th>\u4e3b\u306aCSS<\/th>\n<th>\u4f55\u3092\u3059\u308b\u304b<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u57fa\u6e96\u8981\u7d20<\/td>\n<td>anchor-name<\/td>\n<td>\u30a2\u30f3\u30ab\u30fc\u3068\u3057\u3066\u540d\u524d\u3092\u4ed8\u3051\u308b<\/td>\n<\/tr>\n<tr>\n<td>\u914d\u7f6e\u8981\u7d20<\/td>\n<td>position-anchor<\/td>\n<td>\u3069\u306e\u30a2\u30f3\u30ab\u30fc\u3092\u57fa\u6e96\u306b\u3059\u308b\u304b\u6307\u5b9a\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td>\u5ea7\u6a19\u6307\u5b9a<\/td>\n<td>anchor()<\/td>\n<td>\u30a2\u30f3\u30ab\u30fc\u306e\u4e0a\u30fb\u4e0b\u30fb\u4e2d\u592e\u306a\u3069\u3092\u4f4d\u7f6e\u306e\u57fa\u6e96\u306b\u3059\u308b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr>\n<h2>\u6700\u5c0f\u4f8b\uff1a\u30dc\u30bf\u30f3\u306e\u4e0b\u3078\u30c4\u30fc\u30eb\u30c1\u30c3\u30d7\u3092\u7f6e\u304f<\/h2>\n<p>\u307e\u305a\u3001\u30dc\u30bf\u30f3\u3092\u30a2\u30f3\u30ab\u30fc\u306b\u3057\u3066\u3001\u305d\u306e\u4e0b\u3078\u30c4\u30fc\u30eb\u30c1\u30c3\u30d7\u3092\u914d\u7f6e\u3057\u307e\u3059\u3002anchor-name\u306e\u8b58\u5225\u5b50\u306f&#8211;\u3067\u59cb\u307e\u308b\u540d\u524d\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<pre><code>&lt;button class=&quot;help-button&quot;&gt;\u30d8\u30eb\u30d7&lt;\/button&gt;\r\n&lt;p class=&quot;tooltip&quot;&gt;\u3053\u3053\u306b\u8aac\u660e\u304c\u8868\u793a\u3055\u308c\u307e\u3059&lt;\/p&gt;<\/code><\/pre>\n<pre><code>.help-button {\r\n  anchor-name: --help-anchor;\r\n}\r\n\r\n.tooltip {\r\n  position: absolute;\r\n  position-anchor: --help-anchor;\r\n  top: anchor(bottom);\r\n  left: anchor(center);\r\n  transform: translate(-50%, 0.5rem);\r\n}<\/code><\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001\u30c4\u30fc\u30eb\u30c1\u30c3\u30d7\u306e\u4e0a\u7aef\u3092\u30dc\u30bf\u30f3\u306e\u4e0b\u7aef\u306b\u5408\u308f\u305b\u3001\u6a2a\u65b9\u5411\u306f\u30dc\u30bf\u30f3\u306e\u4e2d\u592e\u3092\u57fa\u6e96\u306b\u3057\u3066\u3044\u307e\u3059\u3002JavaScript\u3067getBoundingClientRect()\u3092\u547c\u3073\u3001top\u3084left\u3092\u8a08\u7b97\u3059\u308b\u51e6\u7406\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<hr>\n<h2>anchor-name\u3068position-anchor\u306e\u95a2\u4fc2<\/h2>\n<p>anchor-name\u306f\u57fa\u6e96\u8981\u7d20\u306e\u540d\u524d\u3001position-anchor\u306f\u914d\u7f6e\u8981\u7d20\u304c\u53c2\u7167\u3059\u308b\u540d\u524d\u3067\u3059\u3002\u540c\u3058\u540d\u524d\u3092\u4f7f\u3046\u3053\u3068\u3067\u30012\u3064\u306e\u8981\u7d20\u3092\u95a2\u9023\u4ed8\u3051\u307e\u3059\u3002<\/p>\n<pre><code>.target {\r\n  anchor-name: --profile-card;\r\n}\r\n\r\n.menu {\r\n  position: absolute;\r\n  position-anchor: --profile-card;\r\n}<\/code><\/pre>\n<ul>\n<li>anchor-name\u306f\u57fa\u6e96\u8981\u7d20\u5074\u3078\u6307\u5b9a\u3059\u308b\u3002<\/li>\n<li>position-anchor\u306fposition:absolute\u307e\u305f\u306ffixed\u306a\u3069\u3067\u914d\u7f6e\u3059\u308b\u5074\u3078\u6307\u5b9a\u3059\u308b\u3002<\/li>\n<li>\u540c\u3058\u30a2\u30f3\u30ab\u30fc\u540d\u3092\u8907\u6570\u56de\u4f7f\u3046\u5834\u5408\u306f\u3001\u3069\u306e\u8981\u7d20\u304c\u53c2\u7167\u3055\u308c\u308b\u304b\u30bd\u30fc\u30b9\u9806\u3084\u30b9\u30b3\u30fc\u30d7\u306b\u6ce8\u610f\u3059\u308b\u3002<\/li>\n<\/ul>\n<hr>\n<h2>anchor()\u3067\u4e0a\u4e0b\u5de6\u53f3\u306e\u4f4d\u7f6e\u3092\u6c7a\u3081\u308b<\/h2>\n<p>\u95a2\u9023\u4ed8\u3051\u3060\u3051\u3067\u306f\u5834\u6240\u306f\u6c7a\u307e\u308a\u307e\u305b\u3093\u3002top\u3001right\u3001bottom\u3001left\u306a\u3069\u306einset\u7cfb\u30d7\u30ed\u30d1\u30c6\u30a3\u306banchor()\u3092\u4f7f\u3044\u3001\u30a2\u30f3\u30ab\u30fc\u306e\u3069\u306e\u4f4d\u7f6e\u3078\u5408\u308f\u305b\u308b\u304b\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u6307\u5b9a\u4f8b<\/th>\n<th>\u610f\u5473<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>top: anchor(bottom)<\/td>\n<td>\u914d\u7f6e\u8981\u7d20\u306e\u4e0a\u7aef\u3092\u30a2\u30f3\u30ab\u30fc\u306e\u4e0b\u7aef\u306b\u5408\u308f\u305b\u308b<\/td>\n<\/tr>\n<tr>\n<td>left: anchor(center)<\/td>\n<td>\u6a2a\u65b9\u5411\u306e\u57fa\u6e96\u3092\u30a2\u30f3\u30ab\u30fc\u4e2d\u592e\u306b\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td>right: anchor(left)<\/td>\n<td>\u914d\u7f6e\u8981\u7d20\u306e\u53f3\u7aef\u3092\u30a2\u30f3\u30ab\u30fc\u5de6\u7aef\u306b\u5408\u308f\u305b\u308b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5b9f\u969b\u306eUI\u3067\u306f\u4f59\u767d\u3084\u4e2d\u592e\u5bc4\u305b\u3082\u5fc5\u8981\u306b\u306a\u308b\u305f\u3081\u3001margin\u3084transform\u306a\u3069\u65e2\u5b58CSS\u3068\u7d44\u307f\u5408\u308f\u305b\u307e\u3059\u3002\u8907\u96d1\u306a\u914d\u7f6e\u3067\u306fposition-area\u3084position-try\u7cfb\u306e\u6a5f\u80fd\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u307e\u305a\u306fanchor-name\u3001position-anchor\u3001anchor()\u306e3\u70b9\u304b\u3089\u8a66\u3059\u3068\u7406\u89e3\u3057\u3084\u3059\u3044\u3067\u3059\u3002<\/p>\n<h2>\u5f93\u6765\u306eposition:absolute\u3068\u306e\u9055\u3044<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u89b3\u70b9<\/th>\n<th>\u5f93\u6765\u306eabsolute\u914d\u7f6e<\/th>\n<th>Anchor Positioning<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u57fa\u6e96<\/td>\n<td>\u8fd1\u3044position\u6307\u5b9a\u7956\u5148\u306a\u3069<\/td>\n<td>\u660e\u793a\u3057\u305f\u30a2\u30f3\u30ab\u30fc\u8981\u7d20<\/td>\n<\/tr>\n<tr>\n<td>\u4f4d\u7f6e\u8a08\u7b97<\/td>\n<td>\u89aa\u8981\u7d20\u3068\u306e\u95a2\u4fc2\u3092\u8a2d\u8a08\u3059\u308b<\/td>\n<td>\u30a2\u30f3\u30ab\u30fc\u306e\u4f4d\u7f6e\u3092\u76f4\u63a5\u53c2\u7167\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td>JavaScript\u6e2c\u5b9a<\/td>\n<td>\u8907\u96d1\u306aUI\u3067\u306f\u5fc5\u8981\u306b\u306a\u308b\u3053\u3068\u304c\u3042\u308b<\/td>\n<td>\u5358\u7d14\u306a\u8ffd\u5f93\u306a\u3089\u4e0d\u8981\u306b\u3067\u304d\u308b\u5834\u5408\u304c\u3042\u308b<\/td>\n<\/tr>\n<tr>\n<td>\u53e4\u3044\u30d6\u30e9\u30a6\u30b6\u30fc<\/td>\n<td>\u5e83\u304f\u4f7f\u3048\u308b<\/td>\n<td>\u5bfe\u5fdc\u72b6\u6cc1\u306e\u78ba\u8a8d\u304c\u5fc5\u8981<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Anchor Positioning\u306fposition:absolute\u3092\u7f6e\u304d\u63db\u3048\u308b\u3068\u3044\u3046\u3088\u308a\u3001absolute\/fixed\u8981\u7d20\u304c\u300c\u3069\u306e\u8981\u7d20\u3092\u57fa\u6e96\u306b\u3059\u308b\u304b\u300d\u3092CSS\u3067\u3088\u308a\u660e\u793a\u3057\u3084\u3059\u304f\u3059\u308b\u6a5f\u80fd\u3067\u3059\u3002<\/p>\n<h2>\u672a\u5bfe\u5fdc\u30d6\u30e9\u30a6\u30b6\u30fc\u5411\u3051\u30d5\u30a9\u30fc\u30eb\u30d0\u30c3\u30af<\/h2>\n<p>MDN\u3067\u306fAnchor Positioning\u306e\u4e3b\u8981\u6a5f\u80fd\u304cBaseline 2026\u3068\u3057\u3066\u6848\u5185\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u53e4\u3044\u30d6\u30e9\u30a6\u30b6\u30fc\u3067\u306f\u5229\u7528\u3067\u304d\u306a\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u307e\u305a\u5f93\u6765\u306e\u914d\u7f6e\u3067\u3082\u8aad\u3081\u308b\u72b6\u614b\u3092\u4f5c\u308a\u3001\u5bfe\u5fdc\u74b0\u5883\u3060\u3051\u65b0\u6a5f\u80fd\u3092\u6709\u52b9\u5316\u3059\u308b\u65b9\u6cd5\u304c\u5b89\u5168\u3067\u3059\u3002<\/p>\n<pre><code>.tooltip {\r\n  position: absolute;\r\n  top: 100%;\r\n  left: 50%;\r\n  transform: translate(-50%, 0.5rem);\r\n}\r\n\r\n@supports (anchor-name: --test) {\r\n  .help-button {\r\n    anchor-name: --help-anchor;\r\n  }\r\n\r\n  .tooltip {\r\n    position-anchor: --help-anchor;\r\n    top: anchor(bottom);\r\n    left: anchor(center);\r\n  }\r\n}<\/code><\/pre>\n<p>\u30d5\u30a9\u30fc\u30eb\u30d0\u30c3\u30af\u5074\u3067\u306f\u3001\u30c4\u30fc\u30eb\u30c1\u30c3\u30d7\u3092\u30dc\u30bf\u30f3\u3068\u540c\u3058position\u57fa\u6e96\u306e\u30b3\u30f3\u30c6\u30ca\u30fc\u5185\u3078\u7f6e\u304f\u306a\u3069\u3001\u5f93\u6765\u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u6761\u4ef6\u3092\u6574\u3048\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<h2>\u3046\u307e\u304f\u914d\u7f6e\u3055\u308c\u306a\u3044\u3068\u304d\u306e\u78ba\u8a8d\u30dd\u30a4\u30f3\u30c8<\/h2>\n<ul>\n<li>anchor-name\u3068position-anchor\u306e\u540d\u524d\u304c\u5b8c\u5168\u306b\u4e00\u81f4\u3057\u3066\u3044\u308b\u304b\u3002<\/li>\n<li>\u30a2\u30f3\u30ab\u30fc\u540d\u304c&#8211;\u3067\u59cb\u307e\u308b\u8b58\u5225\u5b50\u306b\u306a\u3063\u3066\u3044\u308b\u304b\u3002<\/li>\n<li>\u914d\u7f6e\u8981\u7d20\u306bposition:absolute\u307e\u305f\u306ffixed\u306a\u3069\u9069\u5207\u306aposition\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u304b\u3002<\/li>\n<li>anchor()\u3092top\/left\u306a\u3069\u9069\u5207\u306a\u4f4d\u7f6e\u30d7\u30ed\u30d1\u30c6\u30a3\u3078\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u304b\u3002<\/li>\n<li>\u540c\u540d\u30a2\u30f3\u30ab\u30fc\u304c\u8907\u6570\u3042\u308a\u3001\u610f\u56f3\u3057\u306a\u3044\u8981\u7d20\u3092\u53c2\u7167\u3057\u3066\u3044\u306a\u3044\u304b\u3002<\/li>\n<li>\u5229\u7528\u30d6\u30e9\u30a6\u30b6\u30fc\u304cAnchor Positioning\u3078\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u304b\u3002<\/li>\n<\/ul>\n<p>\u307e\u305a\u6700\u5c0f\u69cb\u6210\u3078\u623b\u3057\u3001\u30a2\u30f3\u30ab\u30fc1\u500b\u30fb\u914d\u7f6e\u8981\u7d201\u500b\u3067\u52d5\u304d\u3092\u78ba\u8a8d\u3057\u3066\u304b\u3089\u3001\u5b9f\u969b\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3078\u5e83\u3052\u308b\u3068\u539f\u56e0\u3092\u5207\u308a\u5206\u3051\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u3088\u304f\u3042\u308b\u8cea\u554f\u3068\u307e\u3068\u3081<\/h2>\n<h3>Anchor Positioning\u3092\u4f7f\u3048\u3070JavaScript\u306f\u4e0d\u8981\u3067\u3059\u304b\uff1f<\/h3>\n<p>\u4f4d\u7f6e\u3092\u57fa\u6e96\u8981\u7d20\u3078\u8ffd\u5f93\u3055\u305b\u308b\u3060\u3051\u306a\u3089\u4e0d\u8981\u306b\u3067\u304d\u308b\u5834\u9762\u304c\u3042\u308a\u307e\u3059\u3002\u958b\u9589\u72b6\u614b\u3001\u8907\u96d1\u306a\u885d\u7a81\u56de\u907f\u3001\u30a2\u30af\u30bb\u30b7\u30d3\u30ea\u30c6\u30a3\u4e0a\u306e\u632f\u308b\u821e\u3044\u306a\u3069\u306f\u5225\u9014JavaScript\u3084HTML\u8a2d\u8a08\u304c\u5fc5\u8981\u306b\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>anchor-name\u3060\u3051\u6307\u5b9a\u3059\u308c\u3070\u914d\u7f6e\u3055\u308c\u307e\u3059\u304b\uff1f<\/h3>\n<p>\u3044\u3044\u3048\u3002\u914d\u7f6e\u5074\u3067position-anchor\u306a\u3069\u3092\u4f7f\u3063\u3066\u95a2\u9023\u4ed8\u3051\u3001\u3055\u3089\u306banchor()\u3084position-area\u306a\u3069\u3067\u5b9f\u969b\u306e\u4f4d\u7f6e\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<h3>\u53e4\u3044\u30d6\u30e9\u30a6\u30b6\u30fc\u3067\u306f\u3069\u3046\u3059\u308c\u3070\u3088\u3044\u3067\u3059\u304b\uff1f<\/h3>\n<p>\u5f93\u6765\u306eposition:absolute\u306a\u3069\u3067\u6700\u4f4e\u9650\u8868\u793a\u3067\u304d\u308b\u30d5\u30a9\u30fc\u30eb\u30d0\u30c3\u30af\u3092\u5148\u306b\u7528\u610f\u3057\u3001@supports\u3067\u5bfe\u5fdc\u74b0\u5883\u3060\u3051Anchor Positioning\u3092\u6709\u52b9\u5316\u3059\u308b\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u6700\u521d\u306f\u30dc\u30bf\u30f31\u500b\u3068\u30c4\u30fc\u30eb\u30c1\u30c3\u30d71\u500b\u306e\u5c0f\u3055\u306a\u4f8b\u3092\u4f5c\u308a\u3001anchor-name \u2192 position-anchor \u2192 anchor()\u306e\u9806\u306b\u78ba\u8a8d\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"featured_media":6594,"template":"","_links":{"self":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route\/6591"}],"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\/6594"}],"wp:attachment":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/media?parent=6591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}