{"id":761,"date":"2017-08-31T22:05:01","date_gmt":"2017-08-31T13:05:01","guid":{"rendered":"http:\/\/www.clarenet.co.jp\/column\/engineer\/?p=761"},"modified":"2017-08-31T22:05:01","modified_gmt":"2017-08-31T13:05:01","slug":"%e3%83%8f%e3%83%b3%e3%83%90%e3%83%bc%e3%82%ac%e3%83%bc%e3%83%a1%e3%83%8b%e3%83%a5%e3%83%bc","status":"publish","type":"post","link":"https:\/\/4koma-web.com\/coding\/%e3%83%8f%e3%83%b3%e3%83%90%e3%83%bc%e3%82%ac%e3%83%bc%e3%83%a1%e3%83%8b%e3%83%a5%e3%83%bc\/","title":{"rendered":"\u30cf\u30f3\u30d0\u30fc\u30ac\u30fc\u30e1\u30cb\u30e5\u30fc"},"content":{"rendered":"<p>\u30b9\u30e9\u30a4\u30c9\u30a4\u30f3\u30bf\u30a4\u30d7\u306e\u30b9\u30de\u30db\u30e1\u30cb\u30e5\u30fc\u306a\u3093\u304b\u3067\u3001\u30e1\u30cb\u30e5\u30fc\u9818\u57df\u5916\u3092\u30bf\u30c3\u30d7\u3057\u305f\u6642\u306b\u30e1\u30cb\u30e5\u30fc\u304c\u9589\u3058\u308b\u52d5\u4f5c\u3002<br \/>\n\u30b9\u30de\u30db\u30a2\u30d7\u30ea\u306eUI\u3068\u3057\u3066\u306f\u3082\u306f\u3084\u30c7\u30d5\u30a9\u30eb\u30c8\u3068\u8a00\u3048\u307e\u3059\u3088\u306d\u3002<br \/>\n\u5f53\u7136\u3001WEB\u4e0a\u3067\u3082\u540c\u3058\u4f53\u9a13\u304c\u6c42\u3081\u3089\u308c\u307e\u3059\u3002WEB\u306f\u3069\u3093\u3069\u3093\u30a2\u30d7\u30ea\u5316\u3055\u308c\u3066\u3044\u304d\u307e\u3059\u304b\u3089\u3001\u5bc4\u305b\u3066\u3044\u304f\u306e\u306f\u5fc5\u7136\u3002<\/p>\n<p>\u3068\u3044\u3046\u4e8b\u3067\u3001jQuery\u3092\u4f7f\u3063\u3066\u3053\u308c\u3092\u518d\u73fe\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u25bcHTML\u203bBootstrap3\u30d9\u30fc\u30b9<\/p>\n<pre class=\"lang:default decode:true \" >&lt;nav class=\"navbar navbar-default\"&gt;\n  &lt;div class=\"container\"&gt; \n    &lt;div class=\"navbar-header\"&gt;\n      &lt;button id=\"menu-toggle\" type=\"button\" class=\"navbar-toggle collapsed\" data-toggle=\"collapse\" data-target=\"#bs-example-navbar-collapse-1\" aria-expanded=\"false\"&gt;\n        &lt;div class=\"bar\"&gt;&lt;span&gt;&lt;\/span&gt;&lt;\/div&gt;\n      &lt;\/button&gt;\n      &lt;a class=\"navbar-brand\" href=\"#\"&gt;&lt;img src=\"images\/logo.png\" alt=\"\u30ed\u30b4\"&gt;&lt;\/a&gt; &lt;\/div&gt;\n    &lt;div id=\"sidebar-wrapper\"&gt;\n      &lt;div class=\"collapse1 navbar-collapse1 sidebar-nav\" id=\"bs-example-navbar-collapse-1\"&gt;\n        &lt;ul class=\"nav navbar-nav pull-right text-center\"&gt;\n          &lt;li&gt;&lt;a href=\"#\"&gt;\u30db\u30fc\u30e0&lt;\/a&gt; &lt;\/li&gt;\n          &lt;li&gt;&lt;a href=\"#\"&gt;\u30e1\u30cb\u30e5\u30fc\uff11&lt;\/a&gt;&lt;\/li&gt;\n          &lt;li&gt;&lt;a href=\"#\"&gt;\u30e1\u30cb\u30e5\u30fc\uff12&lt;\/a&gt;&lt;\/li&gt;\n          &lt;li&gt;&lt;a href=\"#\"&gt;\u30e1\u30cb\u30e5\u30fc\uff13&lt;\/a&gt;&lt;\/li&gt;\n          &lt;li&gt;&lt;a href=\"#\"&gt;\u30e1\u30cb\u30e5\u30fc\uff14&lt;\/a&gt;&lt;\/li&gt;\n        &lt;\/ul&gt;\n      &lt;\/div&gt;\n    &lt;!-- \/.navbar-collapse --&gt; \n    &lt;\/div&gt;\n  &lt;\/div&gt;\n  &lt;!-- \/.container-fluid --&gt; \n&lt;\/nav&gt;<\/pre>\n<p>\u25bccss<\/p>\n<pre class=\"lang:default decode:true \" >.navbar-toggle .icon-bar {\n  -webkit-transition: all 0.1s;\n  -o-transition: all 0.1s;\n  transition: all 0.1s;\n}\n.navbar-toggle:not(.collapsed) .icon-bar:nth-child(2) {\n   -webkit-transform: rotate(45deg);\n   -ms-transform: rotate(45deg);\n   -o-transform: rotate(45deg);\n   transform: rotate(45deg);\n      position: absolute;\n    top: 0;\n    bottom: 0;\n    right: 0;\n    left: 0;\n    margin: auto;\n}\n.navbar-toggle:not(.collapsed) .icon-bar:nth-child(3) {\n  display: none;\n}\n.navbar-toggle:not(.collapsed) .icon-bar:nth-child(4) {\n   -webkit-transform: rotate(-45deg);\n   -ms-transform: rotate(-45deg);\n   -o-transform: rotate(-45deg);\n   transform: rotate(-45deg);\n      position: absolute;\n    top: 0;\n    bottom: 0;\n    right: 0;\n    left: 0;\n    margin: auto;\n}\n\n\/* sp_Menu *\/\n.bar {\n    position: absolute;\n    right: 4px;\n    top: 14px;\n  }\n  .bar, .bar:before, .bar:after {\n      -webkit-transition: all .25s;\n      transition: all .25s;\n      content: \"\";\n      position: absolute;\n      right: 0;\n      height: 3px;\n      width: 28px;\n      background-color: #fff;\n  }\n  .bar span{\n      position: absolute;\n      bottom: -19px;\n      font-size: 11px;\n  }\n  .bar {\n    position: absolute;\n    right: 4px;\n    top: 14px;\n  }\n  .bar:before {\n    top: -8px;\n  }\n  .navbar-toggle:not(.collapsed) .bar:before {\n    top: 0;\n  }\n  .bar:after {\n    top: 8px;\n  }\n  .navbar-toggle:not(.collapsed) .bar:before, .navbar-toggle:not(.collapsed) .bar:after {\n    -webkit-transition: all .25s;\n    transition: all .25s;\n    top: -0px;\n  }\n  #menu-toggle .menu-collapsed {\n      -webkit-transition: all .25s;\n      transition: all .25s;\n      margin: auto;\n      right: 0;\n      height: 24px;\n      width: 100%;\n      z-index: 1;\n      cursor: pointer;\n  }\n  #menu-toggle .bar {\n    background-color: #fff;\n    -webkit-transition: all .25s;\n    transition: all .25s;\n    top: 23px;\n    right: 0;\n    left: 0;\n    margin: auto;\n  }\n  #menu-toggle.navbar-toggle:not(.collapsed) .bar:before {\n    -webkit-transform: rotate(45deg);\n            transform: rotate(45deg);\n  }\n  #menu-toggle.navbar-toggle:not(.collapsed) .bar:after {\n    -webkit-transform: rotate(-45deg);\n            transform: rotate(-45deg);\n  }\n  #menu-toggle.navbar-toggle:not(.collapsed) .bar span:nth-of-type(1) {\n    -webkit-transform: translateY(16px) rotate(-45deg);\n    transform: translateY(8px) rotate(-45deg);\n  }\n  #menu-toggle.navbar-toggle:not(.collapsed) .bar {\n    background-color: transparent;\n  }\n  #menu-toggle.navbar-toggle:not(.collapsed) .bar span:nth-of-type(3) {\n    -webkit-transform: translateY(-16px) rotate(45deg);\n    transform: translateY(-8px) rotate(45deg);\n  }\n\n\n\/* Side Menu *\/\n#sidebar-wrapper {\n  z-index: 1000;\n  position: fixed;\n  top: 0;\n  right: 0;\n  width: 250px;\n  height: 100%;\n  margin-right: -250px;\n  overflow-y: auto;\n  background: #222;\n  -webkit-transition: all 0.4s ease 0s;\n  -moz-transition: all 0.4s ease 0s;\n  -ms-transition: all 0.4s ease 0s;\n  -o-transition: all 0.4s ease 0s;\n  transition: all 0.4s ease 0s;\n}\n.sidebar-nav {\n  position: absolute;\n  top: 90px;\n  width: 250px;\n  margin: 0;\n  padding: 0 15px;\n  list-style: none;\n  overflow-x: hidden;\n  border: none;\n}\n.sidebar-nav li {\n  line-height: 40px;\n  font-size: 12px;\n}\n.sidebar-nav li a {\n  display: block;\n  text-decoration: none;\n  color: #999;\n}\n.sidebar-nav li a:hover {\n  text-decoration: none;\n  color: #fff;\n  background: rgba(255,255,255,0.2);\n}\n.sidebar-nav li a:active, .sidebar-nav li a:focus {\n  text-decoration: none;\n}\n.sidebar-nav &gt; .sidebar-brand {\n  height: 55px;\n  font-size: 18px;\n  line-height: 55px;\n}\n.sidebar-nav &gt; .sidebar-brand a {\n  color: #999;\n}\n.sidebar-nav &gt; .sidebar-brand a:hover {\n  color: #fff;\n  background: none;\n}\n#menu-toggle {\n  z-index: 1001;\n  position: fixed;\n  top: 0;\n  right: 0;\n  background: #052A78;\n  width: 50px;\n  height: 50px;\n  border-radius: 10px;\n  border: none;\n  margin-top: 20px;\n}\n#sidebar-wrapper {\n  background: #fff;\n}\n#sidebar-wrapper.active {\n  right: 250px;\n  width: 250px;\n  -webkit-transition: all 0.4s ease 0s;\n  -moz-transition: all 0.4s ease 0s;\n  -ms-transition: all 0.4s ease 0s;\n  -o-transition: all 0.4s ease 0s;\n  transition: all 0.4s ease 0s;\n  -webkit-box-shadow: 2px 0px 15px #333;\n  box-shadow: 2px 0px 15px #333;\n}\n#sidebar-wrapper.active ul.nav {\n  float: none !important;\n  margin: 0;\n}\n.toggle {\n  margin: 5px 5px 0 0;\n}\n<\/pre>\n<p> \u25bcjQuery<\/p>\n<pre class=\"lang:default decode:true \" >$(function () {\n  \/\/ \u30b9\u30e9\u30a4\u30c0\u30fc\u30e1\u30cb\u30e5\u30fc\u3092\u9589\u3058\u308b\n  $(\"#menu-close\").click(function(e) {\n      e.preventDefault();\n      $(\"#sidebar-wrapper\").toggleClass(\"active\");\n  });\n\n  \/\/ \u30b9\u30e9\u30a4\u30c0\u30fc\u30e1\u30cb\u30e5\u30fc\u3092\u958b\u304f\n  $(\"#menu-toggle\").click(function(e) {\n      e.preventDefault();\n      $(\"#sidebar-wrapper\").toggleClass(\"active\");\n      $(this).toggleClass(\"collapsed\");\n      $(\"body\").toggleClass(\"open\"); \/\/\u80cc\u666f\u3092\u30b0\u30ec\u30fc\u30a2\u30a6\u30c8\u3059\u308b\u305f\u3081\u306bclass\u4ed8\u4e0e\n  });\n\n  \/\/\u9818\u57df\u5916\u306e\u30af\u30ea\u30c3\u30af\u3067\u30e1\u30cb\u30e5\u30fc\u3092\u9589\u3058\u308b\n  $('#fadeLayer').on('click', function(){\n    if (window.innerWidth &lt;= 768) {\n        if($(\"#sidebar-wrapper\").hasClass(\"active\")){\n            $(\"#sidebar-wrapper\").removeClass(\"active\");\n            $(\"#menu-toggle\").addClass(\"collapsed\");\n            $(\"body\").toggleClass(\"open\");\n        }\n    }\n  });\n  \/\/\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u969b\u306b\u30e1\u30cb\u30e5\u30fc\u3092\u9589\u3058\u308b\n  $('.navbar-nav li a').on('click', function(){\n        if (window.innerWidth &lt;= 768) {\n          if($(\"#sidebar-wrapper\").hasClass(\"active\")){\n              $(\"#sidebar-wrapper\").removeClass(\"active\");\n              $(\"#menu-toggle\").addClass(\"collapsed\");\n              $(\"body\").toggleClass(\"open\");\n          }\n        }\n    });\n  \n  \/\/\u30d8\u30c3\u30c0\u30fc\u9818\u57df\u3067\u306f\u30a4\u30d9\u30f3\u30c8\u3092\u505c\u6b62\n  $('.navbar-header').click(function() {\n        event.stopPropagation();\n  });\n});<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u30b9\u30e9\u30a4\u30c9\u30a4\u30f3\u30bf\u30a4\u30d7\u306e\u30b9\u30de\u30db\u30e1\u30cb\u30e5\u30fc\u306a\u3093\u304b\u3067\u3001\u30e1\u30cb\u30e5\u30fc\u9818\u57df\u5916\u3092\u30bf\u30c3\u30d7\u3057\u305f\u6642\u306b\u30e1\u30cb\u30e5\u30fc\u304c\u9589\u3058\u308b\u52d5\u4f5c\u3002 \u30b9\u30de\u30db\u30a2\u30d7\u30ea\u306eUI\u3068\u3057\u3066\u306f\u3082\u306f\u3084\u30c7\u30d5\u30a9\u30eb\u30c8\u3068\u8a00\u3048\u307e\u3059\u3088\u306d\u3002 \u5f53\u7136\u3001WEB\u4e0a\u3067\u3082\u540c\u3058\u4f53\u9a13\u304c\u6c42\u3081\u3089\u308c\u307e\u3059\u3002WEB\u306f\u3069\u3093\u3069\u3093\u30a2\u30d7 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"","_original_post":"","footnotes":""},"categories":[1],"tags":[],"publishpress_future_action":{"enabled":false,"date":"2026-04-21 23:55:16","action":"change-status","newStatus":"draft","terms":[],"taxonomy":"category"},"_links":{"self":[{"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/posts\/761"}],"collection":[{"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/comments?post=761"}],"version-history":[{"count":0,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/posts\/761\/revisions"}],"wp:attachment":[{"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/media?parent=761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/categories?post=761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/tags?post=761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}