{"id":749,"date":"2013-07-09T23:17:00","date_gmt":"2013-07-09T14:17:00","guid":{"rendered":"http:\/\/www.sriproot.net\/blog\/?p=749"},"modified":"2013-07-09T23:18:19","modified_gmt":"2013-07-09T14:18:19","slug":"image-slideover-tutorial","status":"publish","type":"post","link":"https:\/\/www.sriproot.net\/blog\/image-slideover-tutorial-749","title":{"rendered":"\u753b\u50cf\u306b\u30de\u30a6\u30b9\u30aa\u30fc\u30d0\u30fc\u3057\u3066\u30c6\u30ad\u30b9\u30c8\u3092\u8868\u793a\u3059\u308b"},"content":{"rendered":"<p>\u4f1a\u54e1\u5236\u30b5\u30a4\u30c8\u3092\u4f5c\u3063\u305f\u6642\u306b\u5b9f\u88c5\u3057\u305f\u753b\u50cf\u3068\u30c6\u30ad\u30b9\u30c8\u306e\u898b\u305b\u65b9\u3002<br \/>\n\u771f\u65b0\u3057\u3044\u65b9\u6cd5\u3067\u306f\u306a\u304f\u3066\u3088\u304f\u898b\u308b\u3084\u3064\u3067\u3059\u3002<\/p>\n<p>\u30e1\u30ea\u30c3\u30c8\u3068\u3057\u3066\u306f\u3001\u9650\u3089\u308c\u305f\u30b9\u30da\u30fc\u30b9\u306e\u4e2d\u3067\u30c6\u30ad\u30b9\u30c8\u60c5\u5831\u3092\u4e0e\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3068\u3001\u30ec\u30a4\u30a2\u30a6\u30c8\u304c\u5d29\u308c\u306b\u304f\u3044\u70b9\u3067\u3059\u304b\u306d\u3002<br \/>\n\u30c7\u30e1\u30ea\u30c3\u30c8\u3068\u3059\u308c\u3070\u3001\u30de\u30a6\u30b9\u30aa\u30fc\u30d0\u30fc\u3057\u3066\u3082\u3089\u308f\u306a\u3044\u3068\u30c6\u30ad\u30b9\u30c8\u60c5\u5831\u304c\u308f\u304b\u3089\u306a\u3044\u3002<\/p>\n<p>\u3056\u3063\u3068\u3057\u305f\u78ba\u8a8d\u3067\u3059\u304c\u3001\u4e00\u5fdciPhone\u306a\u3089\u30ef\u30f3\u30af\u30ea\u30c3\u30af\u3067\u30c6\u30ad\u30b9\u30c8\u8868\u793a\u3001\u30c4\u30fc\u30af\u30ea\u30c3\u30af\u76ee\u3067\u30ea\u30f3\u30af\u79fb\u52d5\u3068\u306a\u308b\u3088\u3046\u3067\u3059\u3002<br \/>\n\u3067\u306f\u3001\u4ee5\u4e0b\u305d\u306e\u3084\u308a\u65b9\u3002<br \/>\n<!--more--><br \/>\n\u76ee\u6b21\u306e\u524d\u306b\u3001\u3068\u308a\u3042\u3048\u305a\u30c7\u30e2\u3002<\/p>\n<p class=\"demolink\"><a href=\"https:\/\/www.sriproot.net\/blog\/sample\/slideover\/\" target=\"_blank\">\u30c7\u30e2\u306f\u3053\u3061\u3089<\/a><\/p>\n<h2>\u76ee\u6b21<\/h2>\n<ul>\n<li><a href=\"#step1\">HTML\u3092\u6e96\u5099<\/a><\/li>\n<li><a href=\"#step2\">CSS\u3092\u6e96\u5099<\/a><\/li>\n<li><a href=\"#step3\">jQuery\u3092\u6e96\u5099<\/a><\/li>\n<li><a href=\"#step4\">\u5b8c\u6210<\/a><\/li>\n<li><a href=\"#step5\">\u304a\u307e\u3051<\/a><\/li>\n<\/ul>\n<h2 id=\"step1\">HTML\u3092\u6e96\u5099<\/h2>\n<p>\u307e\u305a\u306f\u57fa\u672c\u3068\u306a\u308bHTML\u3092\u6e96\u5099\u3057\u307e\u3059\u3002<br \/>\n\u30c6\u30ad\u30b9\u30c8\u3068\u753b\u50cf\u304c\u3042\u308c\u3070\u3044\u3044\u3093\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u30d6\u30ed\u30b0\u306b\u63b2\u8f09\u3055\u308c\u3066\u3044\u308b\u753b\u50cf\u3068\u305d\u306e\u30bf\u30a4\u30c8\u30eb\u3068\u3044\u3046\u8a2d\u5b9a\u3067\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u9069\u5f53\u306b\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3057\u3066\u3082\u3089\u3048\u3070\u3044\u3044\u3093\u3067\u3059\u304c\u3001\u50d5\u306f\u4e00\u5fdc\u95a2\u9023\u6027\u3042\u308b\u3082\u306e\u306fdl\u3067\u56f2\u3080\u306e\u304c\u597d\u304d\u306a\u306e\u3067\u305d\u308c\u3067\u3084\u308a\u307e\u3059\u3002<\/p>\n<p>[html]<\/p>\n<dl class=\"slidebase\">\n<dt class=\"slidetext\"><a href=\"#\">\u30d6\u30ed\u30b0\u306e\u30bf\u30a4\u30c8\u30eb<\/a><\/dt>\n<dd class=\"slideimg\"><a href=\"#\"><img decoding=\"async\" src=\"hoge.gif\" alt=\"\u30d6\u30ed\u30b0\u306e\u753b\u50cf\"><\/a><\/dd>\n<\/dl>\n<p>[\/html]<\/p>\n<p>\u3053\u3093\u306a\u611f\u3058\u3002<br \/>\n<img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.sriproot.net\/blog\/wp\/wp-content\/uploads\/2013\/07\/slideover001.jpg\" alt=\"HTML\u3092\u6e96\u5099\u3059\u308b - \u753b\u50cf\u306b\u30de\u30a6\u30b9\u30aa\u30fc\u30d0\u30fc\u3057\u3066\u30c6\u30ad\u30b9\u30c8\u3092\u8868\u793a\u3059\u308b\" width=\"500\" height=\"403\" class=\"aligncenter size-full wp-image-765\" \/><\/p>\n<p>\u5225\u306bh\u30bf\u30b0\u4f7f\u3063\u3066\u3082\u3044\u3044\u3057\u3001\u305d\u306e\u8fba\u306f\u3042\u308f\u305b\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2 id=\"step2\">CSS\u3092\u6e96\u5099<\/h2>\n<p>\u7d9a\u3044\u3066CSS\u3092\u6e96\u5099\u3057\u307e\u3059\u3002<\/p>\n<p>[css]<br \/>\n.slidebase {<br \/>\n  position: relative;<br \/>\n}<br \/>\n.slidetext {<br \/>\n  width: 100%;<br \/>\n  display: none;<br \/>\n  position: absolute;<br \/>\n  color: #fff;<br \/>\n  background: rgba(0, 0, 0, 0.5);<br \/>\n}<br \/>\n.slidetext a {<br \/>\n  padding: 5px;<br \/>\n  display: block;<br \/>\n  color: #fff;<br \/>\n}<br \/>\n.slideimg {<br \/>\n}<br \/>\n[\/css]<\/p>\n<p>\u3088\u3046\u306f\u3001\u30d9\u30fc\u30b9\u306e\u30dc\u30c3\u30af\u30b9\u3092relative\u306b\u3057\u3066\u304a\u3044\u3066\u3001\u30c6\u30ad\u30b9\u30c8\u3092absolute\u306b\u3057\u3066\u4e0a\u306b\u304b\u3076\u305b\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3067\u898b\u305f\u76ee\u306f\u30de\u30a6\u30b9\u30aa\u30fc\u30d0\u30fc\u3059\u308b\u524d\u306e\u72b6\u614b\u306b\u306a\u308a\u307e\u3057\u305f\u3002<br \/>\n<img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.sriproot.net\/blog\/wp\/wp-content\/uploads\/2013\/07\/slideover002.jpg\" alt=\"css\u3092\u6e96\u5099\u3059\u308b - \u753b\u50cf\u306b\u30de\u30a6\u30b9\u30aa\u30fc\u30d0\u30fc\u3057\u3066\u30c6\u30ad\u30b9\u30c8\u3092\u8868\u793a\u3059\u308b\" width=\"500\" height=\"388\" class=\"aligncenter size-full wp-image-763\" \/><\/p>\n<h2 id=\"step3\">jQuery\u3092\u6e96\u5099<\/h2>\n<p>\u52d5\u304d\u3092jQuery\u3067\u4ed8\u3051\u3066\u30c6\u30ad\u30b9\u30c8\u3092\u8868\u793a\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u3068\u3044\u3063\u3066\u3082\u7c21\u5358\u3002<\/p>\n<p>[javascript]<br \/>\njQuery(function(){<br \/>\n  jQuery(&#8220;.slidebase&#8221;).hover(function(){<br \/>\n      jQuery(this).find(&#8220;.slidetext&#8221;).slideToggle(&#8220;normal&#8221;);<br \/>\n   });<br \/>\n});<br \/>\n[\/javascript]<\/p>\n<p>slidebase\u306bhover\u3057\u305f\u3089\u3001slidetext\u3063\u3066\u3084\u3064\u3092sideToggle\u3067\u51fa\u3057\u305f\u308a\u5f15\u3063\u8fbc\u3081\u305f\u308a\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u306d\u3002<\/p>\n<h2 id=\"step4\">\u5b8c\u6210<\/h2>\n<p>\u3053\u308c\u3067\u5b8c\u6210\u3067\u3059\u3002<br \/>\n<img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.sriproot.net\/blog\/wp\/wp-content\/uploads\/2013\/07\/slideover003.jpg\" alt=\"\u5b8c\u6210 - \u753b\u50cf\u306b\u30de\u30a6\u30b9\u30aa\u30fc\u30d0\u30fc\u3057\u3066\u30c6\u30ad\u30b9\u30c8\u3092\u8868\u793a\u3059\u308b\" width=\"500\" height=\"386\" class=\"aligncenter size-full wp-image-764\" \/><\/p>\n<p class=\"demolink\"><a href=\"https:\/\/www.sriproot.net\/blog\/sample\/slideover\/\" target=\"_blank\">\u30c7\u30e2\u306f\u3053\u3061\u3089<\/a><\/p>\n<p>\u30dd\u30fc\u30c8\u30d5\u30a9\u30ea\u30aa\u306a\u3093\u304b\u3067\u753b\u50cf\u30b5\u30e0\u30cd\u30a4\u30eb\u3092\u6a2a\u4e26\u3073\u306b\u3057\u305f\u3044\u6642\u3068\u304b\u306b\u4f7f\u3048\u308b\u3093\u3058\u3083\u306a\u3044\u304b\u306a\u3041\u3068\u3002<br \/>\n\u30c6\u30ad\u30b9\u30c8\u3092\u753b\u50cf\u4e0b\u3068\u304b\u306b\u5165\u308c\u3066\u308b\u3068\u3001\u305d\u308c\u305e\u308c\u30dc\u30c3\u30af\u30b9\u306e\u9ad8\u3055\u304c\u9055\u3063\u3066\u63c3\u3048\u308b\u306e\u3081\u3093\u3069\u304f\u3055\u304b\u3063\u305f\u308a\u3057\u307e\u3059\u3057\u3002<\/p>\n<h2 id=\"step5\">\u304a\u307e\u3051<\/h2>\n<p>\u3053\u306e\u65b9\u6cd5\u3001WordPress\u3067\u4f5c\u3063\u305f\u4f1a\u54e1\u5236\u30b5\u30a4\u30c8\u306b\u5b9f\u88c5\u3057\u3066\u3044\u305f\u3093\u3067\u3059\u304c\u3001\u4f8b\u3048\u3070\u30bf\u30a4\u30c8\u30eb\u304c\u9577\u3059\u304e\u308b\u6642\u306a\u3093\u304b\u3001WordPress\u3060\u3063\u305f\u3089\u8a18\u4e8b\u8868\u793a\u3059\u308b\u30eb\u30fc\u30d7\u306e\u4e2d\u3067<\/p>\n<p>[php]<br \/>\nif(mb_strlen($post->post_title,&#8217;UTF-8&#8242;)>24) {<br \/>\n  $title= mb_substr($post->post_title,0,24,&#8217;UTF-8&#8242;);<br \/>\n  echo $title.\u2026;<br \/>\n} else {<br \/>\n  echo $post->post_title;<br \/>\n}<br \/>\n[\/php]<\/p>\n<p>\u3068\u304b\u3063\u3066\u3084\u3063\u3066\u3042\u3052\u308b\u3068\u3001\u77ed\u304f\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3088\u3002<br \/>\n\u4e0a\u8a18\u4f8b\u3060\u306824\u6587\u5b57\u3088\u308a\u591a\u3044\u3068\u305d\u3053\u3067\u5207\u3063\u3066\u300c\u2026\u300d\u3092\u52a0\u3048\u3066\u307e\u3059\u3002<br \/>\n\uff08\u3082\u3057\u304b\u3057\u305f\u3089\u3084\u308a\u65b9\u53e4\u304b\u3063\u305f\u308a\u3059\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u306e\u3067\u3001\u305d\u3053\u306f\u304d\u3061\u3093\u3068\u3054\u78ba\u8a8d\u304f\u3060\u3055\u3044\u2026\uff09<\/p>\n<p>\u3055\u3066\u3001\u5b9f\u306f\u4ee5\u524d\u304b\u3089\u904b\u55b6\u306b\u643a\u308f\u3063\u3066\u3044\u305f\u4f1a\u54e1\u5236\u30b5\u30a4\u30c8\u3067\u3059\u304c\u3001\u50d5\u81ea\u8eab\u304c\u5b8c\u5168\u64a4\u9000\u3057\u307e\u3057\u305f\u2026<br \/>\n\uff08\u305d\u306e\u30b5\u30a4\u30c8\u306f\u653e\u7f6e\u3055\u308c\u3066\u30cd\u30c3\u30c8\u306e\u6d77\u3092\u6f02\u3063\u3066\u308b\u307f\u305f\u3044\u3067\u3059\u304c\u2026\uff09<br \/>\n\u60b2\u3057\u3044\u304b\u306a\u3053\u308c\u304c\u73fe\u5b9f\u2026<\/p>\n<p>\u305d\u3044\u304e\uff5e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010\u30b3\u30fc\u30c9\u4ed8\u304d\u3067\u6d41\u308c\u304c\u308f\u304b\u308b\u3011\u753b\u50cf\u306b\u30de\u30a6\u30b9\u30aa\u30fc\u30d0\u30fc\u3059\u308b\u3068\u3001\u30c6\u30ad\u30b9\u30c8\u304c\u3059\u308b\u3059\u308b\u3063\u3068\u753b\u50cf\u306e\u4e0a\u306b\u51fa\u3066\u304f\u308b\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u3059\u3002HTML\u3082CSS\u3082\u96e3\u3057\u3044\u3053\u3068\u3057\u306a\u3044\u3067\u3001\uff4aQuery\u3092\u4f7f\u3063\u3066\u52d5\u304d\u3092\u3064\u3051\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"author":2,"featured_media":770,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[33],"tags":[51,84,58],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.sriproot.net\/blog\/wp-json\/wp\/v2\/posts\/749"}],"collection":[{"href":"https:\/\/www.sriproot.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sriproot.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sriproot.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sriproot.net\/blog\/wp-json\/wp\/v2\/comments?post=749"}],"version-history":[{"count":0,"href":"https:\/\/www.sriproot.net\/blog\/wp-json\/wp\/v2\/posts\/749\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sriproot.net\/blog\/wp-json\/wp\/v2\/media\/770"}],"wp:attachment":[{"href":"https:\/\/www.sriproot.net\/blog\/wp-json\/wp\/v2\/media?parent=749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sriproot.net\/blog\/wp-json\/wp\/v2\/categories?post=749"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sriproot.net\/blog\/wp-json\/wp\/v2\/tags?post=749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}