{"id":1287,"date":"2025-04-12T12:08:32","date_gmt":"2025-04-12T03:08:32","guid":{"rendered":"https:\/\/route-zero.com\/recruit\/route\/1287\/"},"modified":"2025-06-27T14:09:09","modified_gmt":"2025-06-27T05:09:09","slug":"1287","status":"publish","type":"route","link":"https:\/\/route-zero.com\/recruit\/route\/1287\/","title":{"rendered":"\u521d\u5fc3\u8005\u5411\u3051CSS\u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u89e3\u8aac\uff5c2025\u5e74\u5bfe\u5fdc\u30fb\u30b5\u30f3\u30d7\u30eb\u4ed8\u304d\u3067\u30b9\u30de\u30db\u5bfe\u5fdc\u3092\u30de\u30b9\u30bf\u30fc"},"content":{"rendered":"<div>\n<h3>\u30b9\u30de\u30db\u3067\u5d29\u308c\u308b\uff1f\u521d\u5fc3\u8005\u304c\u3064\u307e\u305a\u304f\u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u306e\u58c1<\/h3>\n<p>\u3042\u306a\u305f\u3082\u3053\u3093\u306a\u7d4c\u9a13\u3042\u308a\u307e\u305b\u3093\u304b\uff1f<\/p>\n<p>\u300cPC\u3067\u306f\u304d\u308c\u3044\u306b\u898b\u3048\u3066\u3044\u308b\u306e\u306b\u3001\u30b9\u30de\u30db\u3067\u898b\u305f\u3089\u5d29\u308c\u3066\u3044\u308b\u2026\u300d\u305d\u3093\u306a\u7d4c\u9a13\u3001\u3042\u308b\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002\u305f\u3068\u3048\u3070\u6587\u5b57\u304c\u5c0f\u3055\u3059\u304e\u3066\u8aad\u307f\u306b\u304f\u304b\u3063\u305f\u308a\u3001\u6a2a\u306b\u30b9\u30af\u30ed\u30fc\u30eb\u3067\u304d\u3066\u3057\u307e\u3063\u305f\u308a\u3002\u7279\u306bHTML\/CSS\u306b\u6163\u308c\u3066\u3044\u306a\u3044\u6bb5\u968e\u3060\u3068\u3001\u4f55\u304c\u539f\u56e0\u306a\u306e\u304b\u3082\u3088\u304f\u308f\u304b\u3089\u305a\u3001\u5bfe\u5fdc\u306b\u6642\u9593\u304c\u304b\u304b\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u8fd1\u5e74\u306f\u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3\u304b\u3089\u306e\u30a2\u30af\u30bb\u30b9\u304c\u4e3b\u6d41\u3067\u3059\u3002\u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u5bfe\u5fdc\u306f\u201c\u3084\u3063\u305f\u307b\u3046\u304c\u3044\u3044\u201d\u3067\u306f\u306a\u304f\u201c\u3084\u3063\u3066\u5f53\u305f\u308a\u524d\u201d\u306e\u57fa\u790e\u6280\u8853\u3002\u3068\u306f\u3044\u3048\u3001\u300c\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u4f7f\u308f\u305a\u306bCSS\u3060\u3051\u3067\u3067\u304d\u308b\u306e\uff1f\u300d\u300c\u4f55\u304b\u3089\u59cb\u3081\u305f\u3089\u3044\u3044\u306e\uff1f\u300d\u3068\u3044\u3046\u58f0\u3082\u5c11\u306a\u304f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001CSS\u3060\u3051\u3067\u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u5bfe\u5fdc\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306e\u57fa\u790e\u77e5\u8b58\u3068\u5b9f\u8df5\u7684\u30ce\u30a6\u30cf\u30a6\u3092\u3001\u521d\u5fc3\u8005\u76ee\u7dda\u3067\u3066\u3044\u306d\u3044\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u6700\u7d42\u7684\u306b\u306f\u3001\u300c<strong>\u30b9\u30de\u30db\u3067\u3082\u5d29\u308c\u306a\u3044\u30da\u30fc\u30b8\u3092\u81ea\u529b\u3067\u4f5c\u308c\u308b\uff01<\/strong>\u300d\u3068\u81ea\u4fe1\u3092\u6301\u3066\u308b\u72b6\u614b\u3092\u76ee\u6307\u3057\u307e\u3059\u3002<\/p>\n<hr>\n<h2>\u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u30c7\u30b6\u30a4\u30f3\u3068\u306f\uff1fCSS\u3060\u3051\u3067\u3067\u304d\u308b\u4ed5\u7d44\u307f\u3092\u7406\u89e3\u3057\u3088\u3046<\/h2>\n<p>\u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u30c7\u30b6\u30a4\u30f3\u3068\u306f\u3001<strong>\u753b\u9762\u30b5\u30a4\u30ba\u306b\u5fdc\u3058\u3066Web\u30da\u30fc\u30b8\u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u3084\u30b9\u30bf\u30a4\u30eb\u3092\u67d4\u8edf\u306b\u8abf\u6574\u3059\u308b\u8a2d\u8a08\u624b\u6cd5<\/strong>\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u4ed5\u7d44\u307f\u3092\u652f\u3048\u3066\u3044\u308b\u306e\u304cCSS\u306e\u300c\u30e1\u30c7\u30a3\u30a2\u30af\u30a8\u30ea\uff08@media\uff09\u300d\u3067\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u3042\u308b\u6761\u4ef6\uff08\u305f\u3068\u3048\u3070\u753b\u9762\u5e45\u304c768px\u4ee5\u4e0a\uff09\u3092\u6e80\u305f\u3059\u3068\u304d\u3060\u3051\u3001\u5225\u306eCSS\u30eb\u30fc\u30eb\u3092\u9069\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre><code><span>\/* \u30e2\u30d0\u30a4\u30eb\u3092\u57fa\u672c\u306b\u30b9\u30bf\u30a4\u30eb\u5b9a\u7fa9 *\/<\/span>\r\n<span>.container<\/span> {\r\n  <span>padding<\/span>: <span>16px<\/span>;\r\n}\r\n\r\n<span>\/* \u30bf\u30d6\u30ec\u30c3\u30c8\u4ee5\u4e0a\u306e\u5e45\u306a\u3089\u4e0a\u66f8\u304d *\/<\/span>\r\n@<span>media<\/span> (min-width: <span>768px<\/span>) {\r\n  <span>.container<\/span> {\r\n    <span>padding<\/span>: <span>32px<\/span>;\r\n  }\r\n}<\/code><\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\u3001\u307e\u305a\u306f\u30e2\u30d0\u30a4\u30eb\u5411\u3051\u306b\u30b9\u30bf\u30a4\u30eb\u3092\u5b9a\u7fa9\u3057\u3001\u305d\u308c\u3092PC\u306a\u3069\u5927\u304d\u306a\u753b\u9762\u306b\u5408\u308f\u305b\u3066\u62e1\u5f35\u3057\u3066\u3044\u304f\u65b9\u6cd5\u304c\u300c\u30e2\u30d0\u30a4\u30eb\u30d5\u30a1\u30fc\u30b9\u30c8\u300d\u3068\u547c\u3070\u308c\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a<strong>\u30d6\u30ec\u30a4\u30af\u30dd\u30a4\u30f3\u30c8\uff08\u5207\u308a\u66ff\u3048\u306e\u57fa\u6e96\uff09<\/strong>\u304c\u3088\u304f\u4f7f\u308f\u308c\u307e\u3059\uff1a<\/p>\n<ul>\n<li>\n<p>\u301c767px\uff1a\u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3<\/p>\n<\/li>\n<li>\n<p>768px\u301c1023px\uff1a\u30bf\u30d6\u30ec\u30c3\u30c8<\/p>\n<\/li>\n<li>\n<p>1024px\u301c\uff1aPC<\/p>\n<\/li>\n<\/ul>\n<p>\u3053\u306e\u30d6\u30ec\u30a4\u30af\u30dd\u30a4\u30f3\u30c8\u306f\u56fa\u5b9a\u3067\u306f\u306a\u3044\u306e\u3067\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u5fdc\u3058\u3066\u8abf\u6574\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<hr>\n<h2>\u3088\u304f\u3042\u308b\u8868\u793a\u5d29\u308c\u306e\u539f\u56e0\u3068CSS\u3067\u306e\u5bfe\u51e6\u6cd5<\/h2>\n<p>1. \u3010\u753b\u50cf\u3011\u6a2a\u30b9\u30af\u30ed\u30fc\u30eb\u304c\u51fa\u3066\u3057\u307e\u3046<\/p>\n<p><strong>\u539f\u56e0<\/strong>\uff1a\u753b\u50cf\u306e\u30b5\u30a4\u30ba\u304c\u753b\u9762\u3092\u306f\u307f\u51fa\u3057\u3066\u3044\u308b<\/p>\n<p><strong>\u89e3\u6c7a\u7b56<\/strong>\uff1awidth: 100%; \u3067\u89aa\u8981\u7d20\u306e\u5e45\u306b\u5408\u308f\u305b\u3066\u753b\u50cf\u3092\u7e2e\u5c0f<\/p>\n<pre><code><span>img<\/span> {\r\n  <span>width<\/span>: <span>100%<\/span>;\r\n  <span>height<\/span>: auto;\r\n  <span>display<\/span>: block;\r\n}<\/code><\/pre>\n<p>2. \u3010\u30c6\u30ad\u30b9\u30c8\u3011\u6587\u5b57\u304c\u5c0f\u3055\u3059\u304e\u3066\u8aad\u307f\u306b\u304f\u3044<\/p>\n<p><strong>\u539f\u56e0<\/strong>\uff1aPC\u57fa\u6e96\u306e\u30d5\u30a9\u30f3\u30c8\u30b5\u30a4\u30ba\u3092\u30b9\u30de\u30db\u3067\u3082\u305d\u306e\u307e\u307e\u9069\u7528\u3057\u3066\u3044\u308b<\/p>\n<p><strong>\u89e3\u6c7a\u7b56<\/strong>\uff1aclamp()\u3067\u753b\u9762\u5e45\u306b\u5fdc\u3058\u305f\u30b5\u30a4\u30ba\u8abf\u6574<\/p>\n<pre><code><span>body<\/span> {\r\n  <span>font-size<\/span>: <span>clamp<\/span>(14px, 2.5vw, 16px);\r\n}<\/code><\/pre>\n<p>3. \u3010\u30ec\u30a4\u30a2\u30a6\u30c8\u3011\u8981\u7d20\u304c\u8a70\u307e\u308a\u3059\u304e\u308b\u30fb\u6298\u308a\u8fd4\u3055\u308c\u306a\u3044<\/p>\n<p><strong>\u539f\u56e0<\/strong>\uff1aFlexbox\u4f7f\u7528\u6642\u306bflex-wrap\u3092\u5fd8\u308c\u3066\u3044\u308b<\/p>\n<p><strong>\u89e3\u6c7a\u7b56<\/strong>\uff1a\u660e\u793a\u7684\u306b\u6298\u308a\u8fd4\u3057\u3092\u8a31\u53ef\u3059\u308b<\/p>\n<pre><code><span>.button-row<\/span> {\r\n  <span>display<\/span>: flex;\r\n  <span>flex-wrap<\/span>: wrap;\r\n  <span>gap<\/span>: <span>8px<\/span>;\r\n}<\/code><\/pre>\n<hr>\n<h2>CSS\u3060\u3051\u3067\u6a2a\u30b9\u30af\u30ed\u30fc\u30eb\u3092\u6d88\u3059\u306b\u306f\uff1f<\/h2>\n<p><strong>\u8cea\u554f<\/strong>\uff1a\u30b9\u30de\u30db\u3067\u6a2a\u30b9\u30af\u30ed\u30fc\u30eb\u304c\u51fa\u308b\u30da\u30fc\u30b8\u3001\u3069\u3046\u3059\u308c\u3070\u76f4\u305b\u308b\uff1f<\/p>\n<p><strong>\u7b54\u3048<\/strong>\uff1a\u307e\u305a\u539f\u56e0\u3068\u306a\u308b\u8981\u7d20\u3092\u7279\u5b9a\u3057\u3001\u305d\u306e\u8981\u7d20\u306b max-width: 100% \u3084 overflow-x: hidden \u3092\u9069\u7528\u3059\u308b\u306e\u304c\u4e00\u822c\u7684\u3067\u3059\u3002\u305f\u3060\u3057\u3001overflow-x: hidden \u306f\u6700\u7d42\u624b\u6bb5\u3067\u3042\u308a\u3001\u307e\u305a\u306f\u753b\u50cf\u3084\u30d6\u30ed\u30c3\u30af\u8981\u7d20\u304c\u753b\u9762\u3092\u306f\u307f\u51fa\u3057\u3066\u3044\u306a\u3044\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><code><span>body<\/span> {\r\n  <span>overflow-x<\/span>: hidden;\r\n}<\/code><\/pre>\n<hr>\n<h2>\u3055\u3089\u306b\u5feb\u9069\u306a\u30c7\u30b6\u30a4\u30f3\u3092\u5b9f\u73fe\u3059\u308bCSS\u30e2\u30c0\u30f3\u6280\u8853<\/h2>\n<p>Grid + auto-fit<\/p>\n<pre><code><span>.container<\/span> {\r\n  <span>display<\/span>: grid;\r\n  <span>grid-template-columns<\/span>: <span>repeat<\/span>(auto-fit, minmax(200px, 1fr));\r\n  <span>gap<\/span>: <span>16px<\/span>;\r\n}<\/code><\/pre>\n<p>Container Queries\uff08\u5bfe\u5fdc\u30d6\u30e9\u30a6\u30b6\u3067\u6709\u52b9\uff09<\/p>\n<pre><code>@<span>container<\/span> (min-width: <span>600px<\/span>) {\r\n  <span>.card<\/span> {\r\n    <span>flex-direction<\/span>: row;\r\n  }\r\n}<\/code><\/pre>\n<p>aspect-ratio<\/p>\n<pre><code><span>.card-img<\/span> {\r\n  <span>aspect-ratio<\/span>: <span>16<\/span> \/ <span>9<\/span>;\r\n  <span>width<\/span>: <span>100%<\/span>;\r\n}<\/code><\/pre>\n<hr>\n<h2>\u7dcf\u307e\u3068\u3081\u3068\u6b21\u306b\u5b66\u3076\u3079\u304d\u3053\u3068<\/h2>\n<ul>\n<li>\n<p>\u30b9\u30de\u30db\u5bfe\u5fdc\u306b\u306f\u300c\u30e2\u30d0\u30a4\u30eb\u30d5\u30a1\u30fc\u30b9\u30c8\uff0b\u30e1\u30c7\u30a3\u30a2\u30af\u30a8\u30ea\u300d\u304c\u57fa\u672c<\/p>\n<\/li>\n<li>\n<p>\u753b\u50cf\u30fb\u6587\u5b57\u30fb\u30ec\u30a4\u30a2\u30a6\u30c8\u306e3\u8ef8\u3067\u539f\u56e0\u3092\u7279\u5b9a\u3057\u3084\u3059\u304f\u306a\u308b<\/p>\n<\/li>\n<li>\n<p>clamp()\u3084Grid\u306a\u3069CSS\u306e\u307f\u3067\u5341\u5206\u306b\u5bfe\u5fdc\u53ef\u80fd<\/p>\n<\/li>\n<\/ul>\n<hr>\n<p>\u300cCSS\u3060\u3051\u3067\u3053\u3053\u307e\u3067\u3067\u304d\u308b\u3093\u3060\u300d\u3068\u601d\u3048\u305f\u3089\u3001\u3082\u3046\u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u306f\u6016\u304f\u3042\u308a\u307e\u305b\u3093\u3002\u305c\u3072\u4eca\u65e5\u304b\u3089\u3042\u306a\u305f\u306e\u30da\u30fc\u30b8\u3067\u3082\u5b9f\u8df5\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n<hr>\n<h3>\u3010\u5916\u90e8\u30ea\u30f3\u30af\u3011<\/h3>\n<p><a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/CSS\/Media_Queries\">MDN: \u30e1\u30c7\u30a3\u30a2\u30af\u30a8\u30ea<\/a><\/p>\n<p><a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/CSS\/clamp\">MDN: clamp()<\/a><\/p>\n<p><a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/CSS\/aspect-ratio\">MDN: aspect-ratio<\/a><\/p>\n<p><a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/CSS\/container\">MDN: Container Queries<\/a><\/p>\n<p><a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/CSS\/Using_CSS_custom_properties\">MDN: CSS\u30ab\u30b9\u30bf\u30e0\u30d7\u30ed\u30d1\u30c6\u30a3<\/a><\/p>\n<h3>\u3010\u5185\u90e8\u30ea\u30f3\u30af\u3011<\/h3>\n<p><a href=\"https:\/\/route-zero.com\/recruit\/route\/901\/\">\u3010\u7c21\u5358\u306b\u8a66\u305b\u308b\u3011CSS\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u4ed5\u7d44\u307f\u3092\u5fb9\u5e95\u89e3\u8aac\uff01\u521d\u5fc3\u8005\u3067\u3082\u308f\u304b\u308b\u52d5\u304d\u306e\u4f5c\u308a\u65b9<\/a><\/p>\n<p><a href=\"https:\/\/route-zero.com\/recruit\/route\/1091\/\">CSS\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3068JavaScript\u306e\u7d44\u307f\u5408\u308f\u305b\u3067\u59cb\u3081\u308b\uff01\u521d\u5fc3\u8005\u5411\u3051\u30e6\u30cb\u30fc\u30af\u30a2\u30d7\u30ed\u30fc\u30c110\u9078\u3010\u30b3\u30fc\u30c9\u4f8b\u3042\u308a\u3011<\/a><\/p>\n<p><a href=\"https:\/\/route-zero.com\/recruit\/route\/1076\/\">\u3010CSS\u306e\u57fa\u672c\u3011\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u7c21\u5358\u306b\u4e2d\u592e\u306b\u914d\u7f6e\u3059\u308b\u65b9\u6cd5\u3092\u5fb9\u5e95\u89e3\u8aac<\/a><\/p>\n<p><a href=\"https:\/\/route-zero.com\/recruit\/route\/1252\/\">SCSS\u3063\u3066\u4f55\uff1fCSS\u3068\u306e\u9055\u3044\u3068\u5c0e\u5165\u30e1\u30ea\u30c3\u30c8\u3092\u5b9f\u4f8b\u4ed8\u304d\u3067\u89e3\u8aac<\/a><\/p>\n<\/div>\n","protected":false},"featured_media":1288,"template":"","_links":{"self":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route\/1287"}],"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\/1288"}],"wp:attachment":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/media?parent=1287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}