{"id":381,"date":"2018-03-10T00:55:40","date_gmt":"2018-03-09T15:55:40","guid":{"rendered":"https:\/\/www.dogrow.net\/hp\/?p=381"},"modified":"2018-03-10T01:02:30","modified_gmt":"2018-03-09T16:02:30","slug":"blog38","status":"publish","type":"post","link":"https:\/\/www.dogrow.net\/hp\/blog38\/","title":{"rendered":"(38) \u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u5b58\u5728\u3092\u793a\u3059\u7e26\u578bIndicator"},"content":{"rendered":"<h1 class=\"my_h\">(1) \u3084\u308a\u305f\u3044\u3053\u3068<\/h1>\n<p>\u30da\u30fc\u30b8\u5185\u3067\u7e26\u306b\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u4e26\u3079\u305f\u5834\u5408\u306b\u3001<br \/>\n\u300c\u5168\u4f53\u3067\u3069\u308c\u3060\u3051\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u3042\u308b\u306e\uff1f\u300d<br \/>\n\u300c\u4eca\u3069\u306e\u8fba\u3092\u898b\u3066\u3044\u308b\u306e\uff1f\u300d<br \/>\n\u3092\u77e5\u3089\u305b\u3066\u3042\u3052\u308b\u305f\u3081\u306e\u60c5\u5831\u3092\u8868\u793a\u3057\u305f\u3044\u3002<\/p>\n<p><a href=\"https:\/\/www.dogrow.net\/hp\/sample\/00038\/\" target=\"_blank\">\u5b9f\u88c5\u30b5\u30f3\u30d7\u30eb<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.dogrow.net\/hp\/wp-content\/uploads\/2018\/03\/Image1.gif\" alt=\"\"  \/><\/a><\/p>\n<h1 class=\"my_h\">(2) \u5b9f\u73fe\u65b9\u6cd5<\/h1>\n<h3 class=\"my_h\">HTML<\/h3>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;utf-8&quot;&gt;\r\n\r\n&lt;script src=&quot;\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/3.2.1\/jquery.min.js&quot;&gt;&lt;\/script&gt;\r\n&lt;script src=&quot;.\/script.js&quot;&gt;&lt;\/script&gt;\r\n&lt;link rel=&quot;stylesheet&quot; href=&quot;.\/style.css&quot; \/&gt;\r\n\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;div class=&quot;vertIndicator&quot;&gt;\r\n\t&lt;ul class=&quot;vertIndicator&quot;&gt;\r\n\t\t&lt;li&gt;\r\n\t\t\t&lt;a href=&quot;#content1&quot;&gt;&lt;div class=&quot;vertIndLabel&quot;&gt;content1&lt;\/div&gt;&lt;\/a&gt;\r\n\t\t&lt;\/li&gt;\r\n\t\t&lt;li&gt;\r\n\t\t\t&lt;a href=&quot;#content2&quot;&gt;&lt;div class=&quot;vertIndLabel&quot;&gt;content2&lt;\/div&gt;&lt;\/a&gt;\r\n\t\t&lt;\/li&gt;\r\n\t\t&lt;li&gt;\r\n\t\t\t&lt;a href=&quot;#content3&quot;&gt;&lt;div class=&quot;vertIndLabel&quot;&gt;content3&lt;\/div&gt;&lt;\/a&gt;\r\n\t\t&lt;\/li&gt;\r\n\t\t&lt;li&gt;\r\n\t\t\t&lt;a href=&quot;#content4&quot;&gt;&lt;div class=&quot;vertIndLabel&quot;&gt;content4&lt;\/div&gt;&lt;\/a&gt;\r\n\t\t&lt;\/li&gt;\r\n\t\t&lt;li&gt;\r\n\t\t\t&lt;a href=&quot;#content5&quot;&gt;&lt;div class=&quot;vertIndLabel&quot;&gt;content5&lt;\/div&gt;&lt;\/a&gt;\r\n\t\t&lt;\/li&gt;\r\n\t&lt;\/ul&gt;\r\n&lt;\/div&gt;\r\n\r\n&lt;div id=&quot;content1&quot; class=&quot;vertIndBlock&quot; style=&quot;background-color:#ffe;height:500px&quot;&gt;Contents#1&lt;\/div&gt;\r\n&lt;div id=&quot;content2&quot; class=&quot;vertIndBlock&quot; style=&quot;background-color:#fef;height:500px&quot;&gt;Contents#2&lt;\/div&gt;\r\n&lt;div id=&quot;content3&quot; class=&quot;vertIndBlock&quot; style=&quot;background-color:#eff;height:600px&quot;&gt;Contents#3&lt;\/div&gt;\r\n&lt;div id=&quot;content4&quot; class=&quot;vertIndBlock&quot; style=&quot;background-color:#ffe;height:500px&quot;&gt;Contents#4&lt;\/div&gt;\r\n&lt;div id=&quot;content5&quot; class=&quot;vertIndBlock&quot; style=&quot;background-color:#fef;height:600px&quot;&gt;Contents#5&lt;\/div&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<h3 class=\"my_h\">CSS<\/h3>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\n.vertIndicator {\r\n\tposition: fixed;\r\n\ttop: 50%;\r\n\tright: 30px;\r\n\tz-index: 10;\r\n}\r\n\r\n.vertIndicator ul {\r\n\tposition: relative;\r\n\tlist-style-type: none;\r\n}\r\n\r\n.vertIndicator ul li{\r\n\tposition: relative;\r\n\tpadding-bottom: 10px;\r\n}\r\n\r\n.vertIndicator a{\r\n\tdisplay: block;\r\n\twidth: 10px;\r\n\theight: 10px;\r\n\ttext-indent: -1000px;\r\n\tborder-radius: 50%;\r\n\tborder: 2px solid #888;\r\n\ttext-decoration: none;\r\n}\r\n.vertIndicator a.indActive{\r\n\tbackground-color: #000;\r\n}\r\n.vertIndicator a.indHover{\r\n\tbackground-color: #aaa;\r\n}\r\n\r\n.vertIndLabel {\r\n\tposition: relative;\r\n\ttop: -60%;\r\n\tleft: -200%;\r\n\ttext-align: right;\r\n\tvertical-align: middle;\r\n\tcolor: #888;\r\n\tdisplay: none;\r\n}\r\n<\/pre>\n<h3 class=\"my_h\">JavaScript<\/h3>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n$(document).ready(function($){\r\n\tvar catLocate = &#x5B;];\r\n\t$('.vertIndBlock').each(function() {\r\n\t\tcatLocate.push($(this).offset().top);\r\n\t});\r\n\r\n\tfunction setActive(){\r\n\t\tvar position = $(document).scrollTop();\r\n\t\tvar index;\r\n\t\tfor(var i=0 ; i &lt; catLocate.length ; i++){\r\n\t\t\tif (position &lt;= catLocate&#x5B;i]) {\r\n\t\t\t\tindex = i; break;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$('.vertIndicator ul li a').removeClass('indActive');\r\n\t\t$('.vertIndicator ul li a').removeClass('indHover');\r\n\t\t$('.vertIndicator ul li a:eq('+index+')').addClass('indActive');\r\n\t}\r\n\tsetActive();\r\n\r\n\t$('a').click(function(){\r\n\t\t$('html, body').animate({\r\n\t\t\tscrollTop: $($.attr(this, 'href')).offset().top\r\n\t\t}, 1000);\r\n\t\treturn false;\r\n\t});\r\n\r\n\t$('.vertIndicator ul li a').click(function () {\r\n\t\t$('.vertIndicator ul li a').removeClass('indActive');\r\n\t\t$(this).addClass('indActive');\r\n\t}); \r\n\r\n\t$('.vertIndicator a').hover(function() {\r\n\t\t$(this).find('.vertIndLabel').show();\r\n\t\t$(this).addClass('indHover');\r\n\t}, function() {\r\n\t\t$(this).find('.vertIndLabel').hide();\r\n\t\t$(this).removeClass('indHover');\r\n\t});\r\n\r\n\t$(document).scroll(function(){\r\n\t\tsetActive();\r\n\t});\r\n\r\n\t$('.vertIndicator ul li a').click(function () {\r\n\t\t$('.vertIndicator ul li a').removeClass('indActive');\r\n\t\t$('.vertIndicator ul li a').removeClass('indHover');\r\n\t\t$(this).addClass('indActive');\r\n\t});   \r\n});\r\n<\/pre>\n<hr class=\"my_hr_bottom\">\n","protected":false},"excerpt":{"rendered":"<p>(1) \u3084\u308a\u305f\u3044\u3053\u3068 \u30da\u30fc\u30b8\u5185\u3067\u7e26\u306b\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u4e26\u3079\u305f\u5834\u5408\u306b\u3001 \u300c\u5168\u4f53\u3067\u3069\u308c\u3060\u3051\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u3042\u308b\u306e\uff1f\u300d \u300c\u4eca\u3069\u306e\u8fba\u3092\u898b\u3066\u3044\u308b\u306e\uff1f\u300d \u3092\u77e5\u3089\u305b\u3066\u3042\u3052\u308b\u305f\u3081\u306e\u60c5\u5831\u3092\u8868\u793a\u3057\u305f\u3044\u3002 \u5b9f\u88c5\u30b5\u30f3\u30d7\u30eb (2) \u5b9f\u73fe\u65b9\u6cd5 HTML &#038;\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.dogrow.net\/hp\/blog38\/\">\u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-381","post","type-post","status-publish","format-standard","hentry","category-htmlcss","category-javascriptjquery"],"views":1520,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.dogrow.net\/hp\/wp-json\/wp\/v2\/posts\/381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dogrow.net\/hp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dogrow.net\/hp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/hp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/hp\/wp-json\/wp\/v2\/comments?post=381"}],"version-history":[{"count":5,"href":"https:\/\/www.dogrow.net\/hp\/wp-json\/wp\/v2\/posts\/381\/revisions"}],"predecessor-version":[{"id":387,"href":"https:\/\/www.dogrow.net\/hp\/wp-json\/wp\/v2\/posts\/381\/revisions\/387"}],"wp:attachment":[{"href":"https:\/\/www.dogrow.net\/hp\/wp-json\/wp\/v2\/media?parent=381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dogrow.net\/hp\/wp-json\/wp\/v2\/categories?post=381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dogrow.net\/hp\/wp-json\/wp\/v2\/tags?post=381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}