{"id":4840,"date":"2026-01-14T09:25:37","date_gmt":"2026-01-14T00:25:37","guid":{"rendered":"https:\/\/dennie.tokyo\/it\/?p=4840"},"modified":"2026-01-14T10:11:53","modified_gmt":"2026-01-14T01:11:53","slug":"%e3%80%90css%e3%80%91%e3%82%b9%e3%82%af%e3%83%aa%e3%83%bc%e3%83%b3%e3%82%b5%e3%82%a4%e3%82%ba%e3%81%ab%e5%bf%9c%e3%81%98%e3%81%9f%e3%82%b9%e3%82%bf%e3%82%a4%e3%83%ab%e3%81%ae%e9%81%a9%e7%94%a8","status":"publish","type":"post","link":"https:\/\/dennie.tokyo\/it\/?p=4840","title":{"rendered":"\u3010CSS\u3011\u30b9\u30af\u30ea\u30fc\u30f3\u30b5\u30a4\u30ba\u306b\u5fdc\u3058\u305f\u30b9\u30bf\u30a4\u30eb\u306e\u9069\u7528"},"content":{"rendered":"\n<p>\u30b9\u30af\u30ea\u30fc\u30f3\u30b5\u30a4\u30ba(px)\u306b\u5fdc\u3058\u3066\u9069\u7528\u3059\u308bcss\u3092\u5207\u308a\u66ff\u3048\u308b\u4e8b\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<h1 class=\"wp-block-heading\">\u8003\u3048\u65b9<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">\u753b\u9762\u30b5\u30a4\u30ba\u304c ~ \u4ee5\u4e0a\u306e\u5834\u5408<\/h2>\n\n\n\n<p>\u753b\u9762\u30b5\u30a4\u30ba\u304c XX px \u4ee5\u4e0a\u306e\u5834\u5408\u306b\u5272\u308a\u5f53\u3066\u305f\u3044\u30b9\u30bf\u30a4\u30eb\u3092\u6307\u5b9a\u3059\u308b\u306b\u306f\u3001css\u3078\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8f09\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-css\" data-lang=\"CSS\"><code>\/*\u3000\u901a\u5e38\u9069\u7528\u3055\u308c\u308b\u30b9\u30bf\u30a4\u30eb\u3000*\/\n.box-test {\n  width: 100%;\n  height: 100px;\n  background-color: aqua;\n}\n\n\/*\u3000\u753b\u9762\u30b5\u30a4\u30ba\u304c680px\u304b\u3089\u306f\u3053\u3053\u3092\u8aad\u307f\u8fbc\u3080\u3000*\/\n@media screen and (min-width:680px) {\n  .box-test {\n    background-color: blueviolet;\n  }\n}<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u753b\u9762\u30b5\u30a4\u30ba\u304c ~ \u4ee5\u4e0b\u306e\u5834\u5408<\/h2>\n\n\n\n<p>\u753b\u9762\u30b5\u30a4\u30ba\u304c XX px \u4ee5\u4e0b\u306e\u5834\u5408\u306b\u5272\u308a\u5f53\u3066\u305f\u3044\u30b9\u30bf\u30a4\u30eb\u3092\u6307\u5b9a\u3059\u308b\u306b\u306f\u3001css\u3078\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8f09\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-css\" data-lang=\"CSS\"><code>\/*\u3000\u901a\u5e38\u9069\u7528\u3055\u308c\u308b\u30b9\u30bf\u30a4\u30eb\u3000*\/\n.box-test {\n  width: 100%;\n  height: 100px;\n  background-color: aqua;\n}\n\n\/*\u3000\u753b\u9762\u30b5\u30a4\u30ba\u304c680px\u307e\u3067\u306f\u3053\u3053\u3092\u8aad\u307f\u8fbc\u3080\u3000*\/\n@media screen and (max-width:680px) {\n  .box-test {\n    background-color: blueviolet;\n  }\n}<\/code><\/pre><\/div>\n\n\n\n<h1 class=\"wp-block-heading\">\u4f8b<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">min-width<\/h2>\n\n\n\n<p>min-width \u3092\u6307\u5b9a\u3057 \u301cpx \u304b\u3089\u306f\u3068\u3044\u3046\u3088\u3046\u306a\u6307\u5b9a\u3092\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>HTML<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-html\" data-lang=\"HTML\"><code>&lt;div class=&quot;box-test&quot;&gt;&lt;\/div&gt;<\/code><\/pre><\/div>\n\n\n\n<p><strong>CSS<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-css\" data-lang=\"CSS\"><code>\/*\u3000\u901a\u5e38\u9069\u7528\u3055\u308c\u308b\u30b9\u30bf\u30a4\u30eb\u3000*\/\n.box-test {\n  width: 100%;\n  height: 100px;\n  background-color: aqua;\n}\n\n\/*\u3000\u753b\u9762\u30b5\u30a4\u30ba\u304c700px\u304b\u3089\u306f\u3053\u3053\u3092\u8aad\u307f\u8fbc\u3080\u3000*\/\n@media screen and (min-width:700px) {\n  .box-test {\n    background-color: blueviolet;\n  }\n}\n\n\/*\u3000\u753b\u9762\u30b5\u30a4\u30ba\u304c800px\u304b\u3089\u306f\u3053\u3053\u3092\u8aad\u307f\u8fbc\u3080\u3000*\/\n@media screen and (min-width:800px) {\n  .box-test {\n    background-color: yellowgreen;\n  }\n}<\/code><\/pre><\/div>\n\n\n\n<p><strong>\u7d50\u679c<\/strong><\/p>\n\n\n\n<p>PC\u306e\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u30d6\u30e9\u30a6\u30b6\u306e\u30b5\u30a4\u30ba\u3092\u5909\u3048\u308b\u3068\u78ba\u8a8d\u51fa\u6765\u307e\u3059\u3002\u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3\u304b\u3089\u3060\u3068\u7e26\u8868\u793a\u3092\u6a2a\u8868\u793a\u306b\u3059\u308b\u3068\u78ba\u8a8d\u3067\u304d\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<style>\n.box-test-min {\n  width: 100%;\n  height: 100px;\n  background-color: aqua;\n}\n\n@media screen and (min-width:700px) {\n  .box-test-min {\n    background-color: blueviolet;\n  }\n}\n\n@media screen and (min-width:800px) {\n  .box-test-min {\n    background-color: yellowgreen;\n  }\n}\n<\/style>\n<div class=\"box-test-min\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">max-width<\/h2>\n\n\n\n<p>max-width \u3092\u6307\u5b9a\u3057 \u301cpx \u307e\u3067\u306f\u3068\u3044\u3046\u3088\u3046\u306a\u6307\u5b9a\u3092\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>HTML<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-html\" data-lang=\"HTML\"><code>&lt;div class=&quot;box-test&quot;&gt;&lt;\/div&gt;<\/code><\/pre><\/div>\n\n\n\n<p><strong>CSS<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-css\" data-lang=\"CSS\"><code>\/*\u3000\u901a\u5e38\u9069\u7528\u3055\u308c\u308b\u30b9\u30bf\u30a4\u30eb\u3000*\/\n.box-test {\n  width: 100%;\n  height: 100px;\n  background-color: aqua;\n}\n\n\/*\u3000\u753b\u9762\u30b5\u30a4\u30ba\u304c1000px\u307e\u3067\u306f\u3053\u3053\u3092\u8aad\u307f\u8fbc\u3080\u3000*\/\n@media screen and (max-width:1000px) {\n  .box-test {\n    background-color: blueviolet;\n    \n  }\n}\n\n\/*\u3000\u753b\u9762\u30b5\u30a4\u30ba\u304c700px\u307e\u3067\u306f\u3053\u3053\u3092\u8aad\u307f\u8fbc\u3080\u3000*\/\n@media screen and (max-width:700px) {\n  .box-test {\n    background-color: yellowgreen;\n  }\n}<\/code><\/pre><\/div>\n\n\n\n<p><strong>\u7d50\u679c<\/strong><\/p>\n\n\n\n<p>PC\u306e\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u30d6\u30e9\u30a6\u30b6\u306e\u30b5\u30a4\u30ba\u3092\u5909\u3048\u308b\u3068\u78ba\u8a8d\u51fa\u6765\u307e\u3059\u3002\u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3\u304b\u3089\u3060\u3068\u7e26\u8868\u793a\u3092\u6a2a\u8868\u793a\u306b\u3059\u308b\u3068\u78ba\u8a8d\u3067\u304d\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<style>\n.box-test-max {\n  width: 100%;\n  height: 100px;\n  background-color: aqua;\n}\n\n@media screen and (max-width:1000px) {\n  .box-test-max {\n    background-color: blueviolet;\n  }\n}\n\n@media screen and (max-width:700px) {\n  .box-test-max {\n    background-color: yellowgreen;\n  }\n}\n<\/style>\n<div class=\"box-test-max\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">min-width \u3068 max-width<\/h2>\n\n\n\n<p>min-width \u3068 max-width \u306f\u4e21\u65b9\u6307\u5b9a\u51fa\u6765\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>CSS<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-css\" data-lang=\"CSS\"><code>\/*\u3000\u901a\u5e38\u9069\u7528\u3055\u308c\u308b\u30b9\u30bf\u30a4\u30eb\u3000*\/\n.box-test {\n  width: 100%;\n  height: 100px;\n  background-color: aqua;\n}\n\n\/*\u3000\u753b\u9762\u30b5\u30a4\u30ba\u304c700px\u4ee5\u4e0a\u3001800px\u307e\u3067\u306f\u3053\u3053\u3092\u8aad\u307f\u8fbc\u3080\u3000*\/\n@media screen and (min-width:700px) and (max-width:800px) {\n  .box-test {\n    background-color: blueviolet;\n  }\n}\n\n\/*\u3000\u753b\u9762\u30b5\u30a4\u30ba\u304c800px\u304b\u3089\u306f\u3053\u3053\u3092\u8aad\u307f\u8fbc\u3080\u3000*\/\n@media screen and (min-width:800px) {\n  .box-test {\n    background-color: yellowgreen;\n  }\n}\n<\/code><\/pre><\/div>\n\n\n\n<p><strong>\u7d50\u679c<\/strong><\/p>\n\n\n\n<style>\n.box-test-min-max {\n  width: 100%;\n  height: 100px;\n  background-color: aqua;\n}\n\n@media screen and (min-width:700px) and (max-width:800px) {\n  .box-test-min-max {\n    background-color: blueviolet;\n  }\n}\n\n@media screen and (min-width:800px) {\n  .box-test-min-max {\n    background-color: yellowgreen;\n  }\n}\n<\/style>\n<div class=\"box-test-min-max\"><\/div>\n\n\n\n<h1 class=\"wp-block-heading\">\u6ce8\u610f<\/h1>\n\n\n\n<p>CSS\u306e\u8a18\u8f09\u306f\u5f8c\u52dd\u3061\u306b\u306a\u308a\u307e\u3059\u3002\u5f93\u3063\u3066\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8f09\u3059\u308b\u3068\u610f\u56f3\u3057\u305f\u52d5\u304d\u306b\u306a\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u5834\u5408\u3001\u30b9\u30af\u30ea\u30fc\u30f3\u30b5\u30a4\u30ba1000px\u307e\u3067\u306e\u6307\u5b9a\u304c\u6709\u52b9\u306b\u306a\u308b\u306e\u3067\u3001\u30b9\u30af\u30ea\u30fc\u30f3\u30b5\u30a4\u30ba700px\u307e\u3067\u306e\u6307\u5b9a\u304c\u7121\u52b9\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>CSS<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-css\" data-lang=\"CSS\"><code>\/*\u3000\u901a\u5e38\u9069\u7528\u3055\u308c\u308b\u30b9\u30bf\u30a4\u30eb\u3000*\/\n.box-test {\n  width: 100%;\n  height: 100px;\n  background-color: aqua;\n}\n\n\/*\u3000\u753b\u9762\u30b5\u30a4\u30ba\u304c700px\u307e\u3067\u306f\u3053\u3053\u3092\u8aad\u307f\u8fbc\u3080\u3000*\/\n@media screen and (max-width:700px) {\n  .box-test {\n    background-color: yellowgreen;\n  }\n}\n\n\/*\u3000\u753b\u9762\u30b5\u30a4\u30ba\u304c1000px\u307e\u3067\u306f\u3053\u3053\u3092\u8aad\u307f\u8fbc\u3080\u3000*\/\n@media screen and (max-width:1000px) {\n  .box-test {\n    background-color: blueviolet;\n    \n  }\n}<\/code><\/pre><\/div>\n\n\n\n<p><strong>\u7d50\u679c<\/strong><\/p>\n\n\n\n<p>\u30b9\u30af\u30ea\u30fc\u30f3\u30b5\u30a4\u30ba700px\u306e\u6307\u5b9a\u306f\u7121\u52b9\u306b\u306a\u308b\u306e\u3067\u3001yellowgreen \u306e\u8272\u306f\u8868\u793a\u3055\u308c\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<style>\n.box-test-max01 {\n  width: 100%;\n  height: 100px;\n  background-color: aqua;\n}\n\n@media screen and (max-width:700px) {\n  .box-test-max01 {\n    background-color: yellowgreen;\n  }\n}\n\n@media screen and (max-width:1000px) {\n  .box-test-max01 {\n    background-color: blueviolet;\n  }\n}\n\n<\/style>\n<div class=\"box-test-max01\"><\/div>\n\n\n\n<h1 class=\"wp-block-heading\">\u6700\u5f8c\u306b<\/h1>\n\n\n\n<p>\u7279\u306b\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30b9\u30af\u30ea\u30fc\u30f3\u30b5\u30a4\u30ba(px)\u306b\u5fdc\u3058\u3066\u9069\u7528\u3059\u308bcss\u3092\u5207\u308a\u66ff\u3048\u308b\u4e8b\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":4723,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-4840","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-css"],"_links":{"self":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts\/4840","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4840"}],"version-history":[{"count":17,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts\/4840\/revisions"}],"predecessor-version":[{"id":4857,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts\/4840\/revisions\/4857"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/media\/4723"}],"wp:attachment":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4840"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4840"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4840"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}