{"id":473,"date":"2020-04-20T10:43:26","date_gmt":"2020-04-20T01:43:26","guid":{"rendered":"https:\/\/058.jp\/twentyseventeen\/?p=473"},"modified":"2020-04-20T11:50:26","modified_gmt":"2020-04-20T02:50:26","slug":"%e3%82%b9%e3%83%9e%e3%83%9b%e3%81%a7%e3%82%82%e3%83%8a%e3%83%93%e3%82%b2%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%82%92%e7%94%bb%e9%9d%a2%e4%b8%8a%e9%83%a8%e3%81%ab%e5%9b%ba%e5%ae%9a%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/058.jp\/twentyseventeen\/archives\/473","title":{"rendered":"\u30b9\u30de\u30db\u3067\u3082\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u3092\u753b\u9762\u4e0a\u90e8\u306b\u56fa\u5b9a\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Twenty Seventeen\u3067\u306f\u3001PC\u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u3060\u3068\u3001\u4e0b\u306b\u30b9\u30af\u30ed\u30fc\u30eb\u3059\u308b\u3068\u3001\u753b\u9762\u4e0a\u90e8\u306b\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u304c\u56fa\u5b9a\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1274\" height=\"783\" src=\"https:\/\/058.jp\/twentyseventeen\/wp\/wp-content\/uploads\/2020\/04\/fix-navigation-01.png\" alt=\"\" class=\"wp-image-474\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u2193 \u4e0b\u306b\u30b9\u30af\u30ed\u30fc\u30eb\u3059\u308b\u3068\u753b\u9762\u4e0a\u90e8\u306b\u8cbc\u308a\u4ed8\u304f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1272\" height=\"379\" src=\"https:\/\/058.jp\/twentyseventeen\/wp\/wp-content\/uploads\/2020\/04\/fix-navigation-02.png\" alt=\"\" class=\"wp-image-475\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b9\u30de\u30db\u306e\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u306f\u3001\u4e0b\u306b\u30b9\u30af\u30ed\u30fc\u30eb\u3059\u308b\u3068\u4e0a\u306b\u6d41\u308c\u3066\u884c\u3063\u3066\u3057\u307e\u3044\u3001\u56fa\u5b9a\u3055\u308c\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b9\u30de\u30db\u306e\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u3082\u56fa\u5b9a\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u624b\u9806<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u8ffd\u52a0CSS\u306b\u4ee5\u4e0b\u3092\u8ffd\u52a0<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">.site-navigation-fixed.navigation-top {\n\tbottom: auto;\n\tposition: fixed;\n\tleft: 0;\n\tright: 0;\n\ttop: 0;\n\twidth: 100%;\n\tz-index: 7;\n}<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">JavaScript\u3092\u4fee\u6b63<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">\u30fb\u672c\u4f53\u3092\u66f8\u304d\u63db\u3048\u308b\u5834\u5408<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3059\u308b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">wp-content\/themes\/twentyseventeen\/assets\/js\/global.js<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">adjustScrollClass\u95a2\u6570\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u7de8\u96c6\u3059\u308b\uff08\u8d64\u6587\u5b57\u90e8\u5206\u3092\u8ffd\u52a0\uff09\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\t\/\/ Make navigation 'stick'.\n\tfunction adjustScrollClass() {\n\n\t\t\/\/ Make sure we're not on a mobile screen.\n\t\tif ( 'none' === $menuToggle.css( 'display' ) ) {\n\n\t\t\t\/\/ Make sure the nav isn't taller than two rows.\n\t\t\tif ( navIsNotTooTall ) {\n\n\t\t\t\t\/\/ When there's a custom header image or video, the header offset includes the height of the navigation.\n\t\t\t\tif ( isFrontPage &amp;&amp; ( $body.hasClass( 'has-header-image' ) || $body.hasClass( 'has-header-video' ) ) ) {\n\t\t\t\t\theaderOffset = $customHeader.innerHeight() - navigationOuterHeight;\n\t\t\t\t} else {\n\t\t\t\t\theaderOffset = $customHeader.innerHeight();\n\t\t\t\t}\n\n\t\t\t\t\/\/ If the scroll is more than the custom header, set the fixed class.\n\t\t\t\tif ( $( window ).scrollTop() &gt;= headerOffset ) {\n\t\t\t\t\t$navigation.addClass( navigationFixedClass );\n\t\t\t\t} else {\n\t\t\t\t\t$navigation.removeClass( navigationFixedClass );\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t\/\/ Remove 'fixed' class if nav is taller than two rows.\n\t\t\t\t$navigation.removeClass( navigationFixedClass );\n\t\t\t}\n<span style=\"color:#c00; background:#ffc;\">\t\t} else {\n\t\t\theaderOffset = $customHeader.innerHeight();\n\t\t\tif ( $( window ).scrollTop() &gt;= headerOffset ) {\n\t\t\t\t$navigation.addClass( navigationFixedClass );\n\t\t\t} else {\n\t\t\t\t$navigation.removeClass( navigationFixedClass );\n\t\t\t}<\/span>\n\t\t}\n\t}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u30fb\u5b50\u30c6\u30fc\u30de\u306e\u5834\u5408<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u672c\u4f53\u3092\u76f4\u63a5\u7de8\u96c6\u3059\u308b\u3068\u624b\u3063\u53d6\u308a\u65e9\u3044\u306e\u3067\u3059\u304c\u3001\u30c6\u30fc\u30de\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3067\u4fee\u6b63\u304c\u4e0a\u66f8\u304d\u3055\u308c\u3066\u3001\u5143\u306b\u623b\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306b\u3082\u5bfe\u5fdc\u3059\u308b\u306b\u306f\u3001\u5b50\u30c6\u30fc\u30de\u3067\u51e6\u7406\u3092\u4e0a\u66f8\u304d\u3059\u308b\u306e\u304c\u3088\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/058.jp\/twentyseventeen\/archives\/1\">\u5b50\u30c6\u30fc\u30de\u3092\u4f5c\u3063\u3066<\/a>\u3001\u89aa\u30c6\u30fc\u30de\uff08TwentySeventeen\uff09\u304b\u3089\u5b50\u30c6\u30fc\u30de\u306b assets\/js\/global.js \u3092\u30b3\u30d4\u30fc\u3057\u3066\u3001\u5b50\u30c6\u30fc\u30de\u5074\u3067\u3001\u4e0a\u306e\u3088\u3046\u306b\u5fc5\u8981\u500b\u6240\u3092\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u89e3\u8aac<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">PC\u306e\u753b\u9762\u5e45\u306e\u3068\u304d\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u304c\u56fa\u5b9a\u3055\u308c\u308b\u306e\u306f\u3001\u4ee5\u4e0b\u306eCSS\u304c\u52b9\u3044\u3066\u3044\u308b\u305f\u3081\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">@media screen and (min-width: 48em) { \/* \u2190 \u753b\u9762\u304c\u5e83\u3044\u3068\u304d\u306b\u9069\u7528 *\/\n\t\/* \u7565 *\/\n\n\t.site-navigation-fixed.navigation-top {\n\t\tbottom: auto;\n\t\tposition: fixed;\n\t\tleft: 0;\n\t\tright: 0;\n\t\ttop: 0;\n\t\twidth: 100%;\n\t\tz-index: 7;\n\t}\n\n\t\/* \u7565 *\/\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u30e1\u30c7\u30a3\u30a2\u30af\u30a8\u30ea\u306a\u3057\u3067\u8ffd\u52a0CSS\u306b\u66f8\u304f\u3053\u3068\u3067\u3001\u3069\u306e\u753b\u9762\u306e\u5e45\u3067\u3082\u9069\u7528\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">.site-navigation-fixed \u3068\u3044\u3046\u30af\u30e9\u30b9\u306f\u3001JavaScript\u306b\u3088\u3063\u3066\u4ed8\u4e0e\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d8\u30c3\u30c0\u90e8\u5206\u304c\u96a0\u308c\u308b\u307e\u3067\u753b\u9762\u3092\u4e0b\u306b\u30b9\u30af\u30ed\u30fc\u30eb\u3057\u305f\u3068\u304d\u306bCSS\u306e\u30af\u30e9\u30b9\uff08.site-navigation-fixed\uff09\u304c\u8ffd\u52a0\u3055\u308c\u3001\u4e0a\u306b\u30b9\u30af\u30ed\u30fc\u30eb\u3059\u308b\u3068\u524a\u9664\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u51e6\u7406\u304c\u30b9\u30de\u30db\u306e\u753b\u9762\u5e45\u306e\u3068\u304d\u306f\u9664\u5916\u3055\u308c\u3066\u3044\u3066\u3001PC\u306e\u753b\u9762\u5e45\u306e\u3068\u304d\u3057\u304b\u5b9f\u884c\u3055\u308c\u306a\u3044\u306e\u3067\u3001\u30b9\u30de\u30db\u306e\u5834\u5408\u3082\u51e6\u7406\u3092\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002\u307e\u305f\u3001\u30d8\u30c3\u30c0\u3084\u30e1\u30cb\u30e5\u30fc\u306e\u9ad8\u3055\u306e\u8a08\u7b97\u304cPC\u7528\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u306e\u90e8\u5206\u3082\u8abf\u6574\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Twenty Seventeen\u3067\u306f\u3001PC\u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u3060\u3068\u3001\u4e0b\u306b\u30b9\u30af\u30ed\u30fc\u30eb\u3059\u308b\u3068\u3001\u753b\u9762\u4e0a\u90e8\u306b\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u304c\u56fa\u5b9a\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002 \u2193 \u4e0b\u306b\u30b9\u30af\u30ed\u30fc\u30eb\u3059\u308b\u3068\u753b\u9762\u4e0a\u90e8\u306b\u8cbc\u308a\u4ed8\u304f\u3002 \u30b9\u30de\u30db\u306e\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u306f\u3001\u4e0b\u306b\u30b9\u30af &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/058.jp\/twentyseventeen\/archives\/473\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u30b9\u30de\u30db\u3067\u3082\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u3092\u753b\u9762\u4e0a\u90e8\u306b\u56fa\u5b9a\u3059\u308b\u65b9\u6cd5&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-473","post","type-post","status-publish","format-standard","hentry","category-1"],"_links":{"self":[{"href":"https:\/\/058.jp\/twentyseventeen\/wp-json\/wp\/v2\/posts\/473","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/058.jp\/twentyseventeen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/058.jp\/twentyseventeen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/058.jp\/twentyseventeen\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/058.jp\/twentyseventeen\/wp-json\/wp\/v2\/comments?post=473"}],"version-history":[{"count":10,"href":"https:\/\/058.jp\/twentyseventeen\/wp-json\/wp\/v2\/posts\/473\/revisions"}],"predecessor-version":[{"id":487,"href":"https:\/\/058.jp\/twentyseventeen\/wp-json\/wp\/v2\/posts\/473\/revisions\/487"}],"wp:attachment":[{"href":"https:\/\/058.jp\/twentyseventeen\/wp-json\/wp\/v2\/media?parent=473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/058.jp\/twentyseventeen\/wp-json\/wp\/v2\/categories?post=473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/058.jp\/twentyseventeen\/wp-json\/wp\/v2\/tags?post=473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}