{"id":141,"date":"2022-02-16T11:05:51","date_gmt":"2022-02-16T02:05:51","guid":{"rendered":"http:\/\/gaku-on.com\/?p=141"},"modified":"2022-02-16T15:12:37","modified_gmt":"2022-02-16T06:12:37","slug":"%e3%81%b5%e3%82%8f%e3%81%a3%e3%81%a8%e3%81%8f%e3%82%8b%e3%80%80%e5%9f%ba%e6%9c%ac","status":"publish","type":"post","link":"http:\/\/gaku-on.com\/?p=141","title":{"rendered":"\u3075\u308f\u3063\u3068\u304f\u308b\u3000\u57fa\u672c"},"content":{"rendered":"\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/moshashugyo.com\/media\/animate-on-scroll\n<\/div><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>HTML\u306b\u306f\n\n\n&lt;section class=\"single\"&gt;\n    &lt;h2&gt;DEMO1&lt;\/h2&gt;\n\n    &lt;div class=\"single-item u-fade-type-up js-scroll-trigger\"&gt;\n        &lt;img src=\"&#91;myphp file='soutai']\/img\/cat1.jpg\" alt=\"\"&gt;\n    &lt;\/div&gt;\n\n    ...\n    &lt;\/div&gt;\n&lt;\/section&gt;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>CSS\u306b\u306f\n\n\/* \u30ec\u30a4\u30a2\u30a6\u30c8\u3084\u898b\u305f\u76ee\u306e\u30b9\u30bf\u30a4\u30eb *\/\n\/* ---------------------------- *\/\n\n.single-item + .single-item{\n    margin-top: 80px;\n}\n\n\/* \u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u30b9\u30bf\u30a4\u30eb *\/\n\/* ---------------------------- *\/\n\n\/* \u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u524d *\/\n.u-fade-type-up{\n    transform: translateY(50px);\n    opacity: 0;\n}\n\n\/* \u30c8\u30ea\u30ac\u30fc\u767a\u706b\u3067is-active\u3092\u4ed8\u4e0e *\/\n.u-fade-type-up.is-active{\n    transition: .6s;\n    transform: translateY(0);\n    opacity: 1;\n}\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;head&gt;\u5185\u306b\u4ee5\u4e0b\u3092\u5165\u308c\u3066\u304a\u304f\n\n&lt;script src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/3.3.1\/jquery.min.js\"&gt;&lt;\/script&gt;\n &lt;script&gt;\n\t $(function () {\n    \/\/ aimation\u547c\u3073\u51fa\u3057\n    if ($('.js-scroll-trigger').length) {\n        scrollAnimation();\n    }\n\n    \/\/ aimation\u95a2\u6570\n    function scrollAnimation() {\n        $(window).scroll(function () {\n            $(\".js-scroll-trigger\").each(function () {\n                let position = $(this).offset().top,\n                    scroll = $(window).scrollTop(),\n                    windowHeight = $(window).height();\n\n                if (scroll &gt; position - windowHeight + 200) {\n                    $(this).addClass('is-active');\n                }\n            });\n        });\n    }\n    $(window).trigger('scroll');\n});\n\t &lt;\/script&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\uff0b\u03b1\u3067\u3000\u30ad\u30e3\u30c3\u30c1\u30b3\u30d4\u30fc\u306a\u3069\u3092\u3075\u308f\u3063\u3068\u3055\u305b\u308b\u306b\u306f\u3000\u4ee5\u4e0b\u306eHTML\u3000\u305d\u306e\u4ed6\u306f\u4e0a\u8a18\u3068\u540c\u3058<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> &lt;div class=\"js-scroll-trigger\">\r\n        &lt;div class=\"multiple-item u-fade-type-up\">\r\n            \u30e1\u30a4\u30f3\u30b3\u30d4\u30fc\u30e1\u30a4\u30f3\u30b3\u30d4\u30fc\r\n        &lt;\/div>\r\n&lt;div class=\"multiple-item u-fade-type-up\">\r\n           \u30b5\u30d6\u30b3\u30d4\u30fc\r\n        &lt;\/div>\r\n &lt;\/div><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\uff0b\u03b1\u3067\u3000\u30ad\u30e3\u30c3\u30c1\u30b3\u30d4\u30fc\u306a\u3069\u3092\u3075\u308f\u3063\u3068\u3055\u305b\u308b\u306b\u306f\u3000\u4ee5&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-141","post","type-post","status-publish","format-standard","hentry","category-jquery-js"],"_links":{"self":[{"href":"http:\/\/gaku-on.com\/index.php?rest_route=\/wp\/v2\/posts\/141","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/gaku-on.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/gaku-on.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/gaku-on.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/gaku-on.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=141"}],"version-history":[{"count":5,"href":"http:\/\/gaku-on.com\/index.php?rest_route=\/wp\/v2\/posts\/141\/revisions"}],"predecessor-version":[{"id":150,"href":"http:\/\/gaku-on.com\/index.php?rest_route=\/wp\/v2\/posts\/141\/revisions\/150"}],"wp:attachment":[{"href":"http:\/\/gaku-on.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/gaku-on.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=141"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/gaku-on.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}