{"id":273,"date":"2015-10-01T12:43:01","date_gmt":"2015-10-01T03:43:01","guid":{"rendered":"http:\/\/nendeb.com\/?p=273"},"modified":"2015-10-25T14:16:23","modified_gmt":"2015-10-25T05:16:23","slug":"wordpress%e3%83%ac%e3%82%b9%e3%83%9d%e3%83%b3%e3%82%b7%e3%83%96%e3%83%86%e3%83%bc%e3%83%9e%e3%81%aecss%e7%b7%a8%e9%9b%86%e3%81%ab%e5%bd%b9%e7%ab%8b%e3%81%a4%e3%80%8c%e7%8f%be%e5%9c%a8%e3%81%ae","status":"publish","type":"post","link":"https:\/\/nendeb.com\/273","title":{"rendered":"WordPress\u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u30c6\u30fc\u30de\u306eCSS\u7de8\u96c6\u306b\u5f79\u7acb\u3064\u300c\u73fe\u5728\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u30b5\u30a4\u30ba\u3092\u8868\u793a\u3059\u308b\u300d\u30b9\u30af\u30ea\u30d7\u30c8"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/nendeb.com\/wp-content\/uploads\/window_width02.png\" alt=\"window_width02\" width=\"1230\" height=\"648\" class=\"alignnone size-full wp-image-275\" \/><br \/>\nWordPress\u3067\u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u30bf\u30a4\u30d7\u306e\u30c6\u30fc\u30de\u306eCSS\u7de8\u96c6\u3092\u3057\u3066\u3044\u308b\u6642\u3001\u73fe\u5728\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u30b5\u30a4\u30ba\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u3001Media Queries \u306e\u30d6\u30ec\u30a4\u30af\u30dd\u30a4\u30f3\u30c8\u524d\u5f8c\u3067\u30d6\u30e9\u30a6\u30b6\u6a5f\u80fd\u306e\u300c\u8981\u7d20\u3092\u8abf\u67fb\u300d\u3084\u300cFirebug\u300d\u306a\u3069\u3092\u4f7f\u3063\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u8907\u6570\u306e\u5e45\u3092<em>\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306b\u4e00\u5ea6\u306b<\/em>\u30c1\u30a7\u30c3\u30af\u3067\u304d\u305f\u3089\u3044\u3044\u306a\u3068\u601d\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001\u73fe\u5728\u306e\u753b\u9762\u30b5\u30a4\u30ba\u3092\u52d5\u7684\u306b\u8868\u793a\u3059\u308b\u7c21\u5358\u306a\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u308a\u307e\u3057\u305f\u306e\u3067\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h2>\u52d5\u4f5c\u30b5\u30f3\u30d7\u30eb<\/h2>\n<p>\u30d6\u30e9\u30a6\u30b6\u306e\u753b\u9762\u3092\u6a2a\u3078\u5927\u304d\u304f\u3057\u305f\u308a\u5c0f\u3055\u304f\u3057\u305f\u308a\u3059\u308b\u3068\u6570\u5024\u304c\u5909\u308f\u308a\u307e\u3059\u3002<\/p>\n<blockquote>\n<div class=\"window_size\">window<\/div>\n<\/blockquote>\n<p><script type=\"text\/javascript\">\n\tjQuery(window).on('load resize', function(){\n\t\tvar w_window = window.innerWidth;\n\t\tvar p_window = jQuery('#primary').outerWidth();\n\t\tvar s_window = jQuery('#secondary').outerWidth();\n\t\tjQuery('.window_size').each(function(){\n\t\t\tvar txt = jQuery(this).html();\n\t\t\tjQuery(this).html(\n\t\t\ttxt.replace( txt ,\n\t\t\t\t'window\uff1a'           + w_window + 'px' + \n\t\t\t\t'<br \/>#primary\uff1a'   + p_window + 'px' + \n\t\t\t\t'<br \/>#secondary\uff1a' + s_window + 'px')\n\t\t\t);\n\t\t});\n\t});\n<\/script><\/p>\n<p>\u3000<br \/>\n<br \/>\n\u3000<\/p>\n<h2>jQuery\u30b3\u30fc\u30c9\u3092\u8a2d\u7f6e<\/h2>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092 header.php \u306e \u4e00\u756a\u4e0b\u306b\u5f35\u308a\u4ed8\u3051\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u306e\u300c\u30c6\u30ad\u30b9\u30c8(\u4efb\u610f\u306e\u30c6\u30ad\u30b9\u30c8\u3084 HTML)\u300d\u306b\u5f35\u308a\u4ed8\u3051\u3066\u3082\u52d5\u4f5c\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;div class=&quot;window_size&quot;&gt;window&lt;\/div&gt;\r\n&lt;script type=&quot;text\/javascript&quot;&gt;\r\n\t\/**\r\n\t * \u73fe\u5728\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u30b5\u30a4\u30ba\u3092\u8868\u793a\u3059\u308b\r\n\t *\r\n\t * License: GPLv2 or later\r\n\t *\/\r\n\tjQuery(window).on('load resize', function(){\r\n\t\tvar w_window = window.innerWidth;\r\n\t\tvar p_window = jQuery('#primary').outerWidth();\r\n\t\tvar s_window = jQuery('#secondary').outerWidth();\r\n\t\tjQuery('.window_size').each(function(){\r\n\t\t\tvar txt = jQuery(this).html();\r\n\t\t\tjQuery(this).html(\r\n\t\t\ttxt.replace( txt ,\r\n\t\t\t\t'window\uff1a'           + w_window + 'px' + \r\n\t\t\t\t'&lt;br \/&gt;#primary\uff1a'   + p_window + 'px' + \r\n\t\t\t\t'&lt;br \/&gt;#secondary\uff1a' + s_window + 'px')\r\n\t\t\t);\r\n\t\t});\r\n\t});\r\n&lt;\/script&gt;\r\n<\/pre>\n<p>\u203b#primary\u3001#secondary \u306f\uff12\u30ab\u30e9\u30e0\u306e\u30e1\u30a4\u30f3\u306e\u90e8\u5206\u3068\u30b5\u30a4\u30c9\u30d0\u30fc\u306e\u90e8\u5206\u3067\u3059\u3002\u30c6\u30fc\u30de\u306b\u5408\u308f\u305b\u3066\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u203b\u8a2d\u7f6e\u5834\u6240\u306f header.php \u3067\u306a\u304f\u3066\u3082\u3044\u3044\u3067\u3059\u3002\u5fc5\u8981\u306a\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306b\u5f35\u308a\u4ed8\u3051\u3066\u3082\u3044\u3044\u3067\u3059\u3002<\/p>\n<p>CSS\u7de8\u96c6\u304c\u7d42\u308f\u308a\u307e\u3057\u305f\u3089\u3053\u306e\u30b3\u30fc\u30c9\u3092\u6d88\u3057\u3066\u304f\u3060\u3055\u3044\u3002(\u6d88\u3057\u5fd8\u308c\u306e\u306a\u3044\u3088\u3046\u306b)<\/p>\n<p>\u3000<\/p>\n<h2>\u5099\u8003<\/h2>\n<p>\u5e45\u306e\u53d6\u5f97\u306f\u4ee5\u4e0b\u306e\u7a2e\u985e\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u5909\u66f4\u3059\u308b\u5834\u5408\u306f\u898b\u305f\u3044\u3082\u306e\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<table>\n<tr>\n<td>outerWidth(true)<\/td>\n<td>margin\u306e\u5916\u5074\u307e\u3067\u306e\u30b5\u30a4\u30ba\u3092\u53d6\u5f97\u3059\u308b<\/td>\n<\/tr>\n<tr>\n<td>outerWidth()<\/td>\n<td>border\u306e\u5916\u5074\u304b\u3089\u306e\u30b5\u30a4\u30ba\u3000(margin\u306f\u542b\u307e\u306a\u3044)<\/td>\n<\/tr>\n<tr>\n<td>innerWidth()<\/td>\n<td>border\u306e\u5185\u5074\u304b\u3089\u306e\u30b5\u30a4\u30ba\u3000(padding\u3092\u542b\u3081\u308b)<\/td>\n<\/tr>\n<\/table>\n<p>\u9759\u7684\u30da\u30fc\u30b8\u3067\u3082\u4f7f\u3044\u305f\u3044\u5834\u5408\u306f\u30b3\u30fc\u30c9\u306e\u300cjQuery\u300d\u3092\u300c$\u300d\u306b\u7f6e\u304d\u63db\u3048\u305f\u3089(\uff17\u30f6\u6240 )\u4f7f\u3048\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3000<\/p>\n<p>\u73fe\u5728\u3001WordPress4.4\u3067\u5b9f\u88c5\u3055\u308c\u308b\u3068\u8a00\u308f\u308c\u3066\u3044\u308b <a href=\"https:\/\/ja.wordpress.org\/themes\/twentysixteen\/\" target=\"_blank\"  rel=\"noopener nofollow\"><u>TwentySixteen<\/u><\/a> \u3092 \u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f7f\u3063\u3066\u4e0d\u52d5\u7523\u30d7\u30e9\u30b0\u30a4\u30f3\u7528\u306b CSS\u3092\u4fee\u6b63\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u5143\u306eCSS\u3067\u306f\u30d6\u30ec\u30a4\u30af\u30dd\u30a4\u30f3\u30c8\u306e\u5358\u4f4d\u304c em \u3060\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u5b9f\u969b\u306e\u30d6\u30ec\u30a4\u30af\u30dd\u30a4\u30f3\u30c8\u304c px \u3067\u89e3\u308b\u306e\u3067\u3068\u3066\u3082\u306f\u304b\u3069\u308a\u307e\u3059\u3087\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress\u3067\u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u30bf\u30a4\u30d7\u306e\u30c6\u30fc\u30de\u306eCSS\u7de8\u96c6\u3092\u3057\u3066\u3044\u308b\u6642\u3001\u73fe\u5728\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u30b5\u30a4\u30ba\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u3001Media Queries \u306e\u30d6\u30ec\u30a4\u30af\u30dd\u30a4\u30f3\u30c8\u524d\u5f8c\u3067\u30d6\u30e9\u30a6\u30b6\u6a5f\u80fd\u306e\u300c\u8981\u7d20\u3092\u8abf\u67fb\u300d\u3084\u300cFirebug\u300d\u306a\u3069\u3092\u4f7f\u3063\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u8907\u6570\u306e\u5e45\u3092\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306b\u4e00\u5ea6\u306b\u30c1\u30a7\u30c3\u30af\u3067\u304d\u305f\u3089\u3044\u3044\u306a\u3068\u601d\u3063\u3066\u3044\u307e\u3057\u305f\u3002&hellip;<\/p>\n","protected":false},"author":1,"featured_media":275,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[61],"class_list":["post-273","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-themes","tag-jquery"],"jetpack_featured_media_url":"https:\/\/nendeb.com\/wp-content\/uploads\/window_width02.png","_links":{"self":[{"href":"https:\/\/nendeb.com\/wp-json\/wp\/v2\/posts\/273","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nendeb.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nendeb.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nendeb.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nendeb.com\/wp-json\/wp\/v2\/comments?post=273"}],"version-history":[{"count":0,"href":"https:\/\/nendeb.com\/wp-json\/wp\/v2\/posts\/273\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nendeb.com\/wp-json\/wp\/v2\/media\/275"}],"wp:attachment":[{"href":"https:\/\/nendeb.com\/wp-json\/wp\/v2\/media?parent=273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nendeb.com\/wp-json\/wp\/v2\/categories?post=273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nendeb.com\/wp-json\/wp\/v2\/tags?post=273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}