{"id":3690,"date":"2021-03-08T10:58:37","date_gmt":"2021-03-08T01:58:37","guid":{"rendered":"https:\/\/fastcoding.jp\/blog\/?p=3690"},"modified":"2021-04-06T11:23:00","modified_gmt":"2021-04-06T02:23:00","slug":"object-fit","status":"publish","type":"post","link":"https:\/\/fastcoding.jp\/blog\/all\/info\/object-fit\/","title":{"rendered":"\u3010CSS\u3011CSS\u3060\u3051\u3067\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3067\u304d\u308b\u300cobject-fit\u300d"},"content":{"rendered":"<div class=\"the_content\"><p>\u3053\u3093\u306b\u3061\u306f\u3002FASTCODING\u30c7\u30b6\u30a4\u30ca\u30fc\u306e\u4e03\u8ee2\u3073\u516b\u91cd\u5b50\u3067\u3059\u3002<br \/>\n\u4eca\u56de\u306f\u3001\u7c21\u5358\u306b\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3067\u304d\u308bCSS\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\u30b5\u30a4\u30ba\u306e\u30d0\u30e9\u30d0\u30e9\u306a\u753b\u50cf\u3092\u4e26\u3079\u308b\u5834\u5408\u306b\u3001\u308f\u3056\u308f\u3056\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u306e\u3067\u3068\u3066\u3082\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<div class=\"table-of-contents\">\n<p class=\"head-ct\">\u76ee\u6b21<\/p>\n<ol>\n<li><a href=\"#no1\"><strong>object-fit\u8a2d\u5b9a<\/strong><\/a>\n<ul>\n<li><a href=\"#no1-1\"><strong>object-fit \u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u3067\u4f7f\u3048\u308b\u5024<\/strong><\/a><\/ul>\n<\/li>\n<li><a href=\"#no2\"><strong>1. \u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3057\u3066\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0<\/strong><\/a><\/li>\n<li><a href=\"#no3\"><strong>2. \u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3057\u3066\u30c8\u30ea\u30df\u30f3\u30b0\u305b\u305a\u4f59\u767d\u3092\u8868\u793a<\/strong><\/a><\/li>\n<li><a href=\"#no4\"><strong>3. \u9ad8\u3055\u3092\u56fa\u5b9a\u3057\u3001\u6a2a\u5e45\u306f\u753b\u9762\u3044\u3063\u3071\u3044\u306b\u8868\u793a<\/strong><\/a><\/li>\n<li><a href=\"#no5\"><strong>4. \u753b\u50cf\u306e\u8868\u793a\u3059\u308b\u4f4d\u7f6e\u3092\u6307\u5b9a\u3059\u308b<\/strong><\/a><\/li>\n<li><a href=\"#no6\"><strong>object-fit\u306e\u30d6\u30e9\u30a6\u30b6\u5bfe\u5fdc\u72b6\u6cc1<\/strong><\/a><\/li>\n<li><a href=\"#no7\"><strong>\u307e\u3068\u3081<\/strong><\/a><\/li>\n<\/ol>\n<\/div>\n<p><br id=\"no1\" \/>\u3000\u3000<\/p>\n<h2>object-fit\u8a2d\u5b9a<\/h2>\n<p><span  style=\"font-weight:bold;font-size:16px;background-color: #ffff00;padding:5px 0;\">\u300cobject-fit\u300d\u306f\u3001CSS\u3067\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30d7\u30ed\u30d1\u30c6\u30a3<\/span>\u3067\u3059\u3002\u753b\u50cf\u30b5\u30a4\u30ba\u304c\u30d0\u30e9\u30d0\u30e9\u306a\u5834\u5408\u3084\u3001\u8868\u793a\u3057\u305f\u3044\u30b5\u30a4\u30ba\u3058\u3083\u306a\u3044\u5834\u5408\u3067\u3082\u3001\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3057\u3066\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4e0b\u8a18\u306e\u3088\u3046\u306bimg\u30bf\u30b0\u306b\u30af\u30e9\u30b9\u540d\u3092\u4ed8\u3051\u3066CSS\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002img\u30bf\u30b0\u3082\u3057\u304f\u306f\u3001\u305d\u306e\u89aa\u8981\u7d20\u306b\u5bfe\u3057\u3066\u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u8868\u793a\u3057\u305f\u3044\u30b5\u30a4\u30ba\u3067\u753b\u50cf\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u4f59\u767d\u3092\u3064\u3051\u305f\u308a\u3001\u753b\u50cf\u306e\u4f4d\u7f6e\u3092\u6307\u5b9a\u3057\u305f\u308a\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nimg {\r\n\twidth: 250px;\r\n\theight: 250px;\r\n\tobject-fit: cover;\r\n}\r\n<\/pre>\n<h3 id=\"no1-1\">object-fit \u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u3067\u4f7f\u3048\u308b\u5024<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/fastcoding.jp\/blog\/wp-content\/uploads\/2020\/12\/2.png\" alt=\"\" width=\"800\" height=\"460\" class=\"aligncenter size-full wp-image-3707\" srcset=\"https:\/\/fastcoding.jp\/blog\/wp-content\/uploads\/2020\/12\/2.png 800w, https:\/\/fastcoding.jp\/blog\/wp-content\/uploads\/2020\/12\/2-300x173.png 300w, https:\/\/fastcoding.jp\/blog\/wp-content\/uploads\/2020\/12\/2-768x442.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/p>\n<div class=\"text_box_blue\">\n<h4>fill<\/h4>\n<p>\u30dc\u30c3\u30af\u30b9\u306e\u30b5\u30a4\u30ba\u306b\u5408\u308f\u305b\u3066\u753b\u50cf\u304c\u7e26\u6a2a\u65b9\u5411\u306b\u62e1\u5927\u30fb\u7e2e\u5c0f\u3055\u308c\u307e\u3059\u3002<span style=\"font-weight:bold; font-size:16px; color:#FF0000; \">\u7e26\u6a2a\u6bd4\u304c\u7dad\u6301\u3055\u308c\u306a\u3044<\/span>\u306e\u3067\u3001\u30b5\u30a4\u30ba\u306b\u3088\u308a\u753b\u50cf\u304c\u4f38\u3073\u305f\u308a\u6f70\u308c\u305f\u308a\u3057\u307e\u3059\u3002<\/p>\n<h4>cover<\/h4>\n<p>\u7e26\u6a2a\u6bd4\u3092\u4fdd\u6301\u3057\u3066\u3001<span style=\"font-weight:bold; font-size:16px; color:#FF0000; \">\u30dc\u30c3\u30af\u30b9\u304c\u753b\u50cf\u3067\u57cb\u307e\u308b\u3088\u3046\u306b\u30ea\u30b5\u30a4\u30ba<\/span>\u3055\u308c\u307e\u3059\u3002\u7e26\u6a2a\u306e\u3046\u3061\u5c0f\u3055\u3044\u65b9\u3092\u57fa\u6e96\u306b\u3057\u3066\u30ea\u30b5\u30a4\u30ba\u3055\u308c\u3001\u30dc\u30c3\u30af\u30b9\u304b\u3089\u306f\u307f\u51fa\u3057\u305f\u90e8\u5206\u306f\u30c8\u30ea\u30df\u30f3\u30b0\u3055\u308c\u307e\u3059\u3002<\/p>\n<h4>contain<\/h4>\n<p>\u753b\u50cf\u306e\u7e26\u6a2a\u6bd4\u3092\u7dad\u6301\u3057\u3066\u3001<span style=\"font-weight:bold; font-size:16px; color:#FF0000; \">\u30dc\u30c3\u30af\u30b9\u306e\u4e2d\u306b\u753b\u50cf\u306e\u3059\u3079\u3066\u304c\u53ce\u307e\u308b\u3088\u3046\u306b\u30ea\u30b5\u30a4\u30ba<\/span>\u3055\u308c\u307e\u3059\u3002<\/p>\n<h4>none<\/h4>\n<p>\u30ea\u30b5\u30a4\u30ba\u305b\u305a\u3001\u305d\u306e\u307e\u307e\u306e\u30b5\u30a4\u30ba\u3067\u8868\u793a\u3055\u308c\u308b<\/p>\n<h4>scale-down<\/h4>\n<p>\u300ccontain\u300d\u3068\u300cnone\u300d\u306e\u3046\u3061\u3001\u30b5\u30a4\u30ba\u304c\u5c0f\u3055\u3044\u65b9\u306b\u5408\u308f\u305b\u3066\u8868\u793a\u3055\u308c\u308b\n<\/p><\/div>\n<p><br id=\"no2\" \/>\u3000\u3000<\/p>\n<h2>1. \u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3057\u3066\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0<\/h2>\n<p>\u753b\u50cf\u306b\u5bfe\u3057\u3066 \u753b\u50cf\u306e\u9ad8\u3055\u3068\u5e45\u3092\u6307\u5b9a\u3057\u3001<span  style=\"font-weight:bold;font-size:16px;background-color: #ffff00;padding:5px 0;\">object-fit: cover; <\/span>\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<br \/>\n\u6307\u5b9a\u306f\u4ee5\u4e0b\u3002<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n\r\nimg {\r\n  width: 200px;\r\n  height: 200px;\r\n  object-fit: cover; \/* \u3053\u306e\u4e00\u884c\u3092\u8ffd\u52a0\u3059\u308b\u3060\u3051\u3067OK! *\/\r\n}\r\n\r\n<\/pre>\n<p><iframe height=\"350\" style=\"width: 100%;\" scrolling=\"no\" title=\"object-fit-cover\" src=\"https:\/\/codepen.io\/fikgpnyd\/embed\/oNzZWRq?height=265&#038;theme-id=dark&#038;default-tab=result\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"><br \/>\n  See the Pen <a href='https:\/\/codepen.io\/fikgpnyd\/pen\/oNzZWRq'>object-fit-cover<\/a> by \u91ce\u7530 \u82f1\u91cc<br \/>\n  (<a href='https:\/\/codepen.io\/fikgpnyd'>@fikgpnyd<\/a>) on <a href='https:\/\/codepen.io'>CodePen<\/a>.<br \/>\n<\/iframe><\/p>\n<p><br id=\"no3\" \/>\u3000\u3000<\/p>\n<h2>2. \u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3057\u3066\u30c8\u30ea\u30df\u30f3\u30b0\u305b\u305a\u4f59\u767d\u3092\u8868\u793a<\/h2>\n<p><span  style=\"font-weight:bold;font-size:16px;background-color: #ffff00;padding:5px 0;\">object-fit: contain;<\/span>\u3092\u6307\u5b9a\u3057\u3066\u3001\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u305b\u305a\u3001\u4f59\u767d\u3092\u8868\u793a\u3057\u3066\u30dc\u30c3\u30af\u30b9\u306e\u4e2d\u592e\u306b\u753b\u50cf\u3092\u8868\u793a\u3057\u307e\u3059\u3002\u5206\u304b\u308a\u6613\u3044\u3088\u3046\u306b\u3001\u753b\u50cf\u306e\u80cc\u666f\u3092\u767d\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n\r\nimg {\r\n  width: 200px;\r\n  height: 200px;\r\n  object-fit: contain; \/* \u3053\u306e\u4e00\u884c\u3092\u8ffd\u52a0\u3059\u308b\u3060\u3051\u3067OK! *\/\r\n}\r\n\r\n<\/pre>\n<p><iframe height=\"350\" style=\"width: 100%;\" scrolling=\"no\" title=\"object-fit-contain\" src=\"https:\/\/codepen.io\/fikgpnyd\/embed\/ExgWXQL?height=265&#038;theme-id=dark&#038;default-tab=result\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"><br \/>\n  See the Pen <a href='https:\/\/codepen.io\/fikgpnyd\/pen\/ExgWXQL'>object-fit-contain<\/a> by \u91ce\u7530 \u82f1\u91cc<br \/>\n  (<a href='https:\/\/codepen.io\/fikgpnyd'>@fikgpnyd<\/a>) on <a href='https:\/\/codepen.io'>CodePen<\/a>.<br \/>\n<\/iframe><\/p>\n<p><br id=\"no4\" \/>\u3000\u3000<\/p>\n<h2>3. \u9ad8\u3055\u3092\u56fa\u5b9a\u3057\u3001\u6a2a\u5e45\u306f\u753b\u9762\u3044\u3063\u3071\u3044\u306b\u8868\u793a<\/h2>\n<p>\u7e26\u306e\u9ad8\u3055\u306e\u307f\u3092\u56fa\u5b9a\u3057\u3066\u3001\u6a2a\u5e45\u306f\u753b\u9762\u3084\u89aa\u8981\u7d20\u3044\u3063\u3071\u3044\u306b\u8868\u793a\u3055\u305b\u305f\u3044\u5834\u5408\u3082 object-fit: cover; \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n\r\nimg {\r\n  width: 100%;\r\n  height: 300px;\r\n  object-fit: cover; \/* \u3053\u306e\u4e00\u884c\u3092\u8ffd\u52a0\u3059\u308b\u3060\u3051\u3067OK! *\/\r\n}\r\n\r\n<\/pre>\n<p><iframe height=\"350\" style=\"width: 100%;\" scrolling=\"no\" title=\"object-fit-cover2\" src=\"https:\/\/codepen.io\/fikgpnyd\/embed\/vYXxZWM?height=265&#038;theme-id=dark&#038;default-tab=result\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"><br \/>\n  See the Pen <a href='https:\/\/codepen.io\/fikgpnyd\/pen\/vYXxZWM'>object-fit-cover2<\/a> by \u91ce\u7530 \u82f1\u91cc<br \/>\n  (<a href='https:\/\/codepen.io\/fikgpnyd'>@fikgpnyd<\/a>) on <a href='https:\/\/codepen.io'>CodePen<\/a>.<br \/>\n<\/iframe><\/p>\n<p><br id=\"no5\" \/>\u3000\u3000<\/p>\n<h2>4. \u753b\u50cf\u306e\u8868\u793a\u3059\u308b\u4f4d\u7f6e\u3092\u6307\u5b9a\u3059\u308b<\/h2>\n<p>object-fit: cover; \u3067\u753b\u50cf\u306e\u7e26\u6a2a\u6bd4\u3092\u4fdd\u6301\u3057\u305f\u307e\u307e\u753b\u50cf\u3092\u4e2d\u592e\u3067\u8868\u793a\u3057\u307e\u3057\u305f\u304c\u3001\u753b\u50cf\u3092\u4e2d\u592e\u4ee5\u5916\u306e\u4f4d\u7f6e\u3067\u30c8\u30ea\u30df\u30f3\u30b0\u3057\u305f\u3044\u6642\u3082\u3042\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002\u305d\u3093\u306a\u6642\u306f\u3001 object-position \u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p><iframe height=\"265\" style=\"width: 100%;\" scrolling=\"no\" title=\"object-fit-position\" src=\"https:\/\/codepen.io\/fikgpnyd\/embed\/yLaMXRz?height=265&#038;theme-id=dark&#038;default-tab=result\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"><br \/>\n  See the Pen <a href='https:\/\/codepen.io\/fikgpnyd\/pen\/yLaMXRz'>object-fit-position<\/a> by \u91ce\u7530 \u82f1\u91cc<br \/>\n  (<a href='https:\/\/codepen.io\/fikgpnyd'>@fikgpnyd<\/a>) on <a href='https:\/\/codepen.io'>CodePen<\/a>.<br \/>\n<\/iframe><br \/>\n<br id=\"no6\" \/>\u3000\u3000<\/p>\n<h2>object-fit\u306e\u30d6\u30e9\u30a6\u30b6\u5bfe\u5fdc\u72b6\u6cc1<\/h2>\n<p>\u6b8b\u5ff5\u306a\u304c\u3089 <span  style=\"font-weight:bold;font-size:16px;background-color: #ffff00;padding:5px 0;\">object-fit\u3001object-position \u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u306fIE\u3068Edge\u306b\u672a\u5bfe\u5fdc<\/span>\u3067\u3059\u3002<\/p>\n<h3>object-fit-images\u3092\u5229\u7528\u3057\u3066\u5bfe\u5fdc\u3055\u305b\u308b<\/h3>\n<p>\u300c<a href=\"https:\/\/github.com\/fregante\/object-fit-images\" rel=\"noopener noreferrer\" target=\"_blank\">Github<\/a>\u300d\u304b\u3089object-fit-images\u306e\u300cdist\u300d\u30d5\u30a9\u30eb\u30c0\u30fc\u5185\u306b\u3042\u308b\u300cofi.min.js\u300d\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/p>\n<h4>\u2460 \u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u305f\u3089HTML\u3067\u8aad\u307f\u8fbc\u307f\u307e\u3059<\/h4>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n\r\n&lt;script src=&quot;\/ofi.min.js&quot;&gt;&lt;\/script&gt;\r\n\r\n<\/pre>\n<h4>\u2461 img\u30bf\u30b0\u306b\u30af\u30e9\u30b9\u540d\uff08\u4efb\u610f\uff09\u3092\u4ed8\u3051\u3066\u3001object-fit \u306e\u8a18\u8ff0<\/h4>\n<p>IE\u306b\u5bfe\u5fdc\u3055\u305b\u308b\u305f\u3081\u306e\u7279\u5225\u30b9\u30bf\u30a4\u30eb\u3068\u3057\u3066 font-family: &#8216;object-fit: contain;&#8217; \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n\r\n.object-fit{\r\n  object-fit: contain;\r\n  font-family: 'object-fit: contain;'\r\n}\r\n\r\n<\/pre>\n<h4>\u2462 \u30b9\u30af\u30ea\u30d7\u30c8\u3092\u547c\u3073\u51fa\u3059<\/h4>\n<p>\u6700\u5f8c\u306bHTML\u306e <\/body> \u306e\u524d\u306b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u547c\u3073\u51fa\u3059\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3059\u308c\u3070\u5b8c\u4e86\u3067\u3059\u3002<br \/>\n(&#8216;\u30af\u30e9\u30b9\u540d&#8217;)\u3067\u3001\u4efb\u610f\u306e\u30af\u30e9\u30b9\u304c\u4e0e\u3048\u3089\u308c\u3066\u3044\u308b\u753b\u50cf\u306b\u306e\u307f\u5bfe\u5fdc\u3055\u305b\u307e\u3059\u3002<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n\r\n&lt;script&gt;\r\n  objectFitImages('\u30af\u30e9\u30b9\u540d');\r\n&lt;\/script&gt;\r\n\r\n<\/pre>\n<p><br id=\"no7\" \/>\u3000\u3000<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>CSS\u3092\u4e00\u884c\u8ffd\u52a0\u3057\u305f\u3060\u3051\u306e\u7c21\u5358\u306a\u6307\u5b9a\u306a\u306e\u3067\u4f7f\u3044\u3084\u3059\u3044\u3067\u3059\u306d\u3002\u30e6\u30fc\u30b6\u30fc\u304c\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u305f\u753b\u50cf\u3092\u8868\u793a\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u5834\u5408\u306b\u3082\u91cd\u5b9d\u3059\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u4ee5\u524d\u7d39\u4ecb\u3057\u305f\u30d6\u30ed\u30c3\u30af\u3092\u7dba\u9e97\u306b\u4e26\u3079\u3066\u8868\u793a\u3055\u305b\u308b\u300cCSS Flexbox\u300d\u3068\u5408\u308f\u305b\u3066\u5229\u7528\u3059\u308b\u3068\u7c21\u5358\u306b\u6574\u5217\u3055\u308c\u305f\u30b5\u30a4\u30c8\u304c\u5b8c\u6210\u3057\u305d\u3046\u3067\u3059\u3002<\/p>\n<div class=\"linkcard\"><div class=\"lkc-internal-wrap\"><a class=\"lkc-link no_icon\" href=\"https:\/\/fastcoding.jp\/blog\/all\/info\/css-flexbox1\/\" data-lkc-id=\"161\" target=\"_blank\"><div class=\"lkc-card\"><div class=\"lkc-info\"><div class=\"lkc-favicon\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.google.com\/s2\/favicons?domain=fastcoding.jp\/blog\" alt=\"\" width=\"16\" height=\"16\" \/><\/div><div class=\"lkc-domain\">FASTCODING BLOG<\/div><\/div><div class=\"lkc-content\"><figure class=\"lkc-thumbnail\"><img decoding=\"async\" class=\"lkc-thumbnail-img\" src=\"\/\/fastcoding.jp\/blog\/wp-content\/uploads\/2020\/07\/1-1-150x150.png\" width=\"\" height=\"108px\" alt=\"\" \/><\/figure><div class=\"lkc-title\">\u30102020\u5e74\u7248\u3011CSS Flexbox \u5b9f\u8df5\uff01\u30ec\u30a4\u30a2\u30a6\u30c8\u3092\u4f5c\u308b<\/div><div class=\"lkc-excerpt\">\u3053\u3093\u306b\u3061\u306f\u3002FASTCODING\u30c7\u30b6\u30a4\u30ca\u30fc\u306e\u4e03\u8ee2\u3073\u516b\u91cd\u5b50\u3067\u3059\u3002CSS\u3067\u30ec\u30a4\u30a2\u30a6\u30c8\u3092\u7d44\u3080\u6642\u3001\u4e00\u6614\u524d\u306ffloat\u306a\u3069\u3092\u4f7f\u3063\u3066\u30ec\u30a4\u30a2\u30a6\u30c8\u3092\u7d44\u3080\u65b9\u6cd5\u304c\u4e00\u822c\u7684\u3067\u3057\u305f\u304c\u3001\u6700\u8fd1\u3067\u306f\u300cFlexbox\uff08\u30d5\u30ec\u30c3\u30af\u30b9\u30dc\u30c3\u30af\u30b9\uff09\u300d\u3092\u4f7f\u3063\u3066\u30ec\u30a4\u30a2\u30a6\u30c8\u3059\u308b\u65b9\u6cd5\u304c\u3088\u304f\u4f7f\u308f\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002Can I Use\u306b\u3088\u308b\u30012020\u5e747\u6708\u73fe\u5728\u306eFlexbox\u306e\u30d6\u30e9\u30a6\u30b6\u5bfe\u5fdc\u72b6\u6cc1\u306f\u3001\u57fa\u672c\u7684\u306b\u3069\u306e\u30d6\u30e9\u30a6\u30b6\u3082\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306fFlexbox\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u304c\u3001IE\u306b\u306f\u82e5\u5e72\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002Internet Explorer\u306e\u5bfe\u5fdc\u72b6\u6cc1\u6700\u65b0\u306eIE 11\u3067\u3001\u3044\u304f\u3064\u304b\u30d0\u30b0\u304c\u5831\u544a\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001Flexbox\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306fIE...<\/div><\/div><div class=\"clear\"><\/div><\/div><\/a><\/div><\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3002FASTCODING\u30c7\u30b6\u30a4\u30ca\u30fc\u306e\u4e03\u8ee2\u3073\u516b\u91cd\u5b50\u3067\u3059\u3002 \u4eca\u56de\u306f\u3001\u7c21\u5358\u306b\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3067\u304d\u308bCSS\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\u30b5\u30a4\u30ba\u306e\u30d0\u30e9\u30d0\u30e9\u306a\u753b\u50cf\u3092\u4e26\u3079\u308b\u5834\u5408\u306b\u3001\u308f\u3056\u308f\u3056\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u306e\u3067\u3068\u3066\u3082\u4fbf\u5229\u3067\u3059\u3002  [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":3719,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[13,12,5,14],"tags":[33,242,31],"class_list":["post-3690","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-frontend","category-webdesign","category-info","category-direction","tag-css","tag-web"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.9 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u3053\u3093\u306b\u3061\u306f\u3002FASTCODING\u30c7\u30b6\u30a4\u30ca\u30fc\u306e\u4e03\u8ee2\u3073\u516b\u91cd\u5b50\u3067\u3059\u3002 \u4eca\u56de\u306f\u3001\u7c21\u5358\u306b\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3067\u304d\u308bCSS\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\u30b5\u30a4\u30ba\u306e\u30d0\u30e9\u30d0\u30e9\u306a\u753b\u50cf\u3092\u4e26\u3079\u308b\u5834\u5408\u306b\u3001\u308f\u3056\u308f\u3056\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u306e\u3067\u3068\u3066\u3082\u4fbf\u5229\u3067\u3059\u3002\" \/>\n\t<meta name=\"robots\" content=\"max-snippet:160, max-image-preview:large, max-video-preview:-1\" \/>\n\t<meta name=\"author\" content=\"\u4e03\u8ee2\u3073\u516b\u91cd\u5b50\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/fastcoding.jp\/blog\/all\/info\/object-fit\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.9\" \/>\n\t\t<meta property=\"og:locale\" content=\"ja_JP\" \/>\n\t\t<meta property=\"og:site_name\" content=\"FASTCODING BLOG | \u682a\u5f0f\u4f1a\u793e\u30d5\u30a1\u30b9\u30c8\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u306e\u516c\u5f0f\u30d6\u30ed\u30b0\u3067\u3059\u3002HTML\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3084JavaScript\u958b\u767a\u3001WordPress\u5236\u4f5c\u3092\u4e2d\u5fc3\u306b\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u958b\u767a\u306b\u95a2\u3059\u308b\u60c5\u5831\u304c\u6e80\u8f09\u3067\u3059\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\u3010CSS\u3011CSS\u3060\u3051\u3067\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3067\u304d\u308b\u300cobject-fit\u300d | FASTCODING BLOG\" \/>\n\t\t<meta property=\"og:description\" content=\"\u3053\u3093\u306b\u3061\u306f\u3002FASTCODING\u30c7\u30b6\u30a4\u30ca\u30fc\u306e\u4e03\u8ee2\u3073\u516b\u91cd\u5b50\u3067\u3059\u3002 \u4eca\u56de\u306f\u3001\u7c21\u5358\u306b\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3067\u304d\u308bCSS\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\u30b5\u30a4\u30ba\u306e\u30d0\u30e9\u30d0\u30e9\u306a\u753b\u50cf\u3092\u4e26\u3079\u308b\u5834\u5408\u306b\u3001\u308f\u3056\u308f\u3056\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u306e\u3067\u3068\u3066\u3082\u4fbf\u5229\u3067\u3059\u3002\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/fastcoding.jp\/blog\/all\/info\/object-fit\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/fastcoding.jp\/blog\/wp-content\/uploads\/2020\/12\/1.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/fastcoding.jp\/blog\/wp-content\/uploads\/2020\/12\/1.png\" \/>\n\t\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t\t<meta property=\"og:image:height\" content=\"533\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2021-03-08T01:58:37+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2021-04-06T02:23:00+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/FASTCODING.jp\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"\u3010CSS\u3011CSS\u3060\u3051\u3067\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3067\u304d\u308b\u300cobject-fit\u300d | FASTCODING BLOG\" \/>\n\t\t<meta name=\"twitter:description\" content=\"\u3053\u3093\u306b\u3061\u306f\u3002FASTCODING\u30c7\u30b6\u30a4\u30ca\u30fc\u306e\u4e03\u8ee2\u3073\u516b\u91cd\u5b50\u3067\u3059\u3002 \u4eca\u56de\u306f\u3001\u7c21\u5358\u306b\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3067\u304d\u308bCSS\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\u30b5\u30a4\u30ba\u306e\u30d0\u30e9\u30d0\u30e9\u306a\u753b\u50cf\u3092\u4e26\u3079\u308b\u5834\u5408\u306b\u3001\u308f\u3056\u308f\u3056\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u306e\u3067\u3068\u3066\u3082\u4fbf\u5229\u3067\u3059\u3002\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/fastcoding.jp\/blog\/wp-content\/uploads\/2020\/12\/1.png\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\u3010CSS\u3011CSS\u3060\u3051\u3067\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3067\u304d\u308b\u300cobject-fit\u300d | FASTCODING BLOG","description":"\u3053\u3093\u306b\u3061\u306f\u3002FASTCODING\u30c7\u30b6\u30a4\u30ca\u30fc\u306e\u4e03\u8ee2\u3073\u516b\u91cd\u5b50\u3067\u3059\u3002 \u4eca\u56de\u306f\u3001\u7c21\u5358\u306b\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3067\u304d\u308bCSS\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\u30b5\u30a4\u30ba\u306e\u30d0\u30e9\u30d0\u30e9\u306a\u753b\u50cf\u3092\u4e26\u3079\u308b\u5834\u5408\u306b\u3001\u308f\u3056\u308f\u3056\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u306e\u3067\u3068\u3066\u3082\u4fbf\u5229\u3067\u3059\u3002","canonical_url":"https:\/\/fastcoding.jp\/blog\/all\/info\/object-fit\/","robots":"max-snippet:160, max-image-preview:large, max-video-preview:-1","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"ja_JP","og:site_name":"FASTCODING BLOG | \u682a\u5f0f\u4f1a\u793e\u30d5\u30a1\u30b9\u30c8\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u306e\u516c\u5f0f\u30d6\u30ed\u30b0\u3067\u3059\u3002HTML\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3084JavaScript\u958b\u767a\u3001WordPress\u5236\u4f5c\u3092\u4e2d\u5fc3\u306b\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u958b\u767a\u306b\u95a2\u3059\u308b\u60c5\u5831\u304c\u6e80\u8f09\u3067\u3059","og:type":"article","og:title":"\u3010CSS\u3011CSS\u3060\u3051\u3067\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3067\u304d\u308b\u300cobject-fit\u300d | FASTCODING BLOG","og:description":"\u3053\u3093\u306b\u3061\u306f\u3002FASTCODING\u30c7\u30b6\u30a4\u30ca\u30fc\u306e\u4e03\u8ee2\u3073\u516b\u91cd\u5b50\u3067\u3059\u3002 \u4eca\u56de\u306f\u3001\u7c21\u5358\u306b\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3067\u304d\u308bCSS\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\u30b5\u30a4\u30ba\u306e\u30d0\u30e9\u30d0\u30e9\u306a\u753b\u50cf\u3092\u4e26\u3079\u308b\u5834\u5408\u306b\u3001\u308f\u3056\u308f\u3056\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u306e\u3067\u3068\u3066\u3082\u4fbf\u5229\u3067\u3059\u3002","og:url":"https:\/\/fastcoding.jp\/blog\/all\/info\/object-fit\/","og:image":"https:\/\/fastcoding.jp\/blog\/wp-content\/uploads\/2020\/12\/1.png","og:image:secure_url":"https:\/\/fastcoding.jp\/blog\/wp-content\/uploads\/2020\/12\/1.png","og:image:width":800,"og:image:height":533,"article:published_time":"2021-03-08T01:58:37+00:00","article:modified_time":"2021-04-06T02:23:00+00:00","article:publisher":"https:\/\/www.facebook.com\/FASTCODING.jp","twitter:card":"summary_large_image","twitter:title":"\u3010CSS\u3011CSS\u3060\u3051\u3067\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3067\u304d\u308b\u300cobject-fit\u300d | FASTCODING BLOG","twitter:description":"\u3053\u3093\u306b\u3061\u306f\u3002FASTCODING\u30c7\u30b6\u30a4\u30ca\u30fc\u306e\u4e03\u8ee2\u3073\u516b\u91cd\u5b50\u3067\u3059\u3002 \u4eca\u56de\u306f\u3001\u7c21\u5358\u306b\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3067\u304d\u308bCSS\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\u30b5\u30a4\u30ba\u306e\u30d0\u30e9\u30d0\u30e9\u306a\u753b\u50cf\u3092\u4e26\u3079\u308b\u5834\u5408\u306b\u3001\u308f\u3056\u308f\u3056\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u306e\u3067\u3068\u3066\u3082\u4fbf\u5229\u3067\u3059\u3002","twitter:image":"https:\/\/fastcoding.jp\/blog\/wp-content\/uploads\/2020\/12\/1.png"},"aioseo_meta_data":{"post_id":"3690","title":null,"description":"\u3053\u3093\u306b\u3061\u306f\u3002FASTCODING\u30c7\u30b6\u30a4\u30ca\u30fc\u306e\u4e03\u8ee2\u3073\u516b\u91cd\u5b50\u3067\u3059\u3002\r\n\u4eca\u56de\u306f\u3001\u7c21\u5358\u306b\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3067\u304d\u308bCSS\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\u30b5\u30a4\u30ba\u306e\u30d0\u30e9\u30d0\u30e9\u306a\u753b\u50cf\u3092\u4e26\u3079\u308b\u5834\u5408\u306b\u3001\u308f\u3056\u308f\u3056\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u306e\u3067\u3068\u3066\u3082\u4fbf\u5229\u3067\u3059\u3002","keywords":"","keyphrases":null,"primary_term":null,"canonical_url":"","og_title":"","og_description":"","og_object_type":"article","og_image_type":"custom_image","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":"https:\/\/fastcoding.jp\/blog\/wp-content\/uploads\/2020\/12\/1.png","og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary_large_image","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2023-09-09 04:30:31","updated":"2025-09-02 04:42:20","seo_analyzer_scan_date":null},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/fastcoding.jp\/blog\/wp-content\/uploads\/2020\/12\/1.png","jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/fastcoding.jp\/blog\/wp-json\/wp\/v2\/posts\/3690","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fastcoding.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fastcoding.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fastcoding.jp\/blog\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/fastcoding.jp\/blog\/wp-json\/wp\/v2\/comments?post=3690"}],"version-history":[{"count":23,"href":"https:\/\/fastcoding.jp\/blog\/wp-json\/wp\/v2\/posts\/3690\/revisions"}],"predecessor-version":[{"id":3720,"href":"https:\/\/fastcoding.jp\/blog\/wp-json\/wp\/v2\/posts\/3690\/revisions\/3720"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fastcoding.jp\/blog\/wp-json\/wp\/v2\/media\/3719"}],"wp:attachment":[{"href":"https:\/\/fastcoding.jp\/blog\/wp-json\/wp\/v2\/media?parent=3690"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fastcoding.jp\/blog\/wp-json\/wp\/v2\/categories?post=3690"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fastcoding.jp\/blog\/wp-json\/wp\/v2\/tags?post=3690"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}