{"id":1163,"date":"2020-09-22T16:39:52","date_gmt":"2020-09-22T07:39:52","guid":{"rendered":"http:\/\/meeny.com\/?p=1163"},"modified":"2020-09-22T16:40:02","modified_gmt":"2020-09-22T07:40:02","slug":"parallax-horizontal-scrolling-ep02","status":"publish","type":"post","link":"https:\/\/meeny.com\/?p=1163","title":{"rendered":"Parallax horizontal scrolling ep02"},"content":{"rendered":"\n<p>Parallax horizontal scrolling ep02 &#8211; Bootstrap<\/p>\n\n\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Parallax horizontal scrolling ep02 - Bootstrap\" width=\"800\" height=\"450\" src=\"https:\/\/www.youtube.com\/embed\/9rjjqB34JiM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">HTML<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!-- Parallax Scroll effect ep02 -->\n&lt;div class=\"section_parallax bg-primary p-5\">\n  &lt;div class=\"container text-center\">\n    &lt;h3 class=\"display-3 w100 text-light\">&lt;span class=\"w500\">Parallax Scroll&lt;\/span> effect ep02&lt;\/h3>\n    &lt;p class=\"text-light\">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.&lt;\/p>\n    &lt;img src=\"images\/scroll1.png\" alt=\"\" id=\"scroll1\" class=\"Mscroll\" Mspeed=\"0.5\" MYoffset=\"2400\">\n    &lt;img src=\"images\/scroll2.png\" alt=\"\" id=\"scroll2\" class=\"Mscroll\" Mspeed=\"-0.1\" MYoffset=\"2200\">\n    &lt;img src=\"images\/scroll3.png\" alt=\"\" id=\"scroll3\" class=\"Mscroll\" Mspeed=\"0.1\" MYoffset=\"2000\">\n  &lt;\/div>\n\n&lt;\/div><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">JS<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>window.addEventListener('scroll' , function () {\n\n\n    \/\/ Parallax Scroll effect ep01\n    const mount1 = document.querySelector('#scroll1')\n    const mount2 = document.querySelector('#scroll2')\n    const mount3 = document.querySelector('#scroll3')\n\n    \/\/console.log(pageYOffset);\n\n    var scrolStart = 1700;\n    if(window.pageYOffset>scrolStart){\n        var scrolled = window.pageYOffset-scrolStart;\n        var Mloca1 = scrolled *.3;\n        var Mloca2 = -(scrolled *.2);\n        var Mloca3 = -(scrolled *.9);\n    }\n\n    mount1.style.transform = 'translateX('+Mloca1+'px)';\n    mount2.style.transform = 'translateX('+Mloca2+'px)';\n    mount3.style.transform = 'translateX('+Mloca3+'px)';\n    \/\/ Parallax Scroll effect ep01\n\n\n\n    \/\/ Parallax Scroll effect ep02\n    var Mscroll = document.querySelectorAll('.Mscroll');\n    Mscroll.forEach(function(Meach){\n        const Mspeed = Meach.getAttribute('Mspeed');\n        const MYoffset = Meach.getAttribute('MYoffset');\n        if(window.pageYOffset>MYoffset){\n            var speed = window.pageYOffset-MYoffset;\n            speed = speed * Mspeed;\n            Meach.style.transform = 'translateX('+speed+'px)';\n        }\n    })\n\n\n\n\n\n\n})<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">SCSS<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>.section_parallax{\n    overflow: hidden;\n\n    background: rgb(0,36,68);\n    background: linear-gradient(0deg, rgba(0,36,68,1) 0%, rgba(15,76,129,1) 46%, rgba(33,126,208,1) 49%, rgba(15,76,129,1) 100%);\n\n    .container{\n        min-height: 700px;\n        position: relative;\n\n        #scroll1{\n            height: 400px;\n            position: absolute;\n            right: -50px;\n            margin-top: 100px;\n            z-index: 12;\n\n        }\n        #scroll2{\n            height: 100px;\n            position: absolute;\n            left: 0;\n            top: 150px;\n            margin-top: 180px;\n            z-index: 11;\n        }\n        #scroll3{\n            height: 50px;\n            position: absolute;\n            left: 250px;\n            top: 150px;\n            margin-top: 190px;\n            z-index: 10;\n        }        \n    }\n}<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-meeny\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"EMFK79JEVa\"><a href=\"https:\/\/meeny.com\/2020\/06\/20\/bootstrap4-theming-ep01\/\">Bootstrap4 theming ep01<\/a><\/blockquote><iframe title=\"&#8220;Bootstrap4 theming ep01&#8221; &#8212; Meeny\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"https:\/\/meeny.com\/2020\/06\/20\/bootstrap4-theming-ep01\/embed\/#?secret=EMFK79JEVa\" data-secret=\"EMFK79JEVa\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-meeny\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"kgkIX2rR7V\"><a href=\"https:\/\/meeny.com\/2020\/06\/22\/bootstrap4-theming-ep02\/\">Bootstrap4 theming ep02<\/a><\/blockquote><iframe title=\"&#8220;Bootstrap4 theming ep02&#8221; &#8212; Meeny\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"https:\/\/meeny.com\/2020\/06\/22\/bootstrap4-theming-ep02\/embed\/#?secret=kgkIX2rR7V\" data-secret=\"kgkIX2rR7V\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Parallax horizontal scrolling ep02 &#8211; Bootstrap HTML JS SCSS<\/p>\n","protected":false},"author":1,"featured_media":1165,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[62],"tags":[415,410,411,443,442,396,397,395,394,398,685,687,422,438,439,441,329],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Parallax horizontal scrolling ep02 - Meeny<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/meeny.com\/?p=1163\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Parallax horizontal scrolling ep02 - Meeny\" \/>\n<meta property=\"og:description\" content=\"Parallax horizontal scrolling ep02 &#8211; Bootstrap HTML JS SCSS\" \/>\n<meta property=\"og:url\" content=\"https:\/\/meeny.com\/?p=1163\" \/>\n<meta property=\"og:site_name\" content=\"Meeny\" \/>\n<meta property=\"article:published_time\" content=\"2020-09-22T07:39:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-09-22T07:40:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/meeny.com\/wp-content\/uploads\/2020\/09\/parallax_t02.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Meeny\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Meeny\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/meeny.com\/?p=1163#article\",\"isPartOf\":{\"@id\":\"https:\/\/meeny.com\/?p=1163\"},\"author\":{\"name\":\"Meeny\",\"@id\":\"https:\/\/meeny.com\/?tag=ios-13-4-5\/#\/schema\/person\/4b6b745d39f90b39161c79fe08a6feb9\"},\"headline\":\"Parallax horizontal scrolling ep02\",\"datePublished\":\"2020-09-22T07:39:52+00:00\",\"dateModified\":\"2020-09-22T07:40:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/meeny.com\/?p=1163\"},\"wordCount\":28,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/meeny.com\/?tag=ios-13-4-5\/#organization\"},\"image\":{\"@id\":\"https:\/\/meeny.com\/?p=1163#primaryimage\"},\"thumbnailUrl\":\"https:\/\/meeny.com\/wp-content\/uploads\/2020\/09\/parallax_t02.png\",\"keywords\":[\"bootstrap\",\"bootstrap css\",\"bootstrap html\",\"Bootstrap4 primary color change\",\"Bootstrap4 theming\",\"css\",\"html\",\"html code\",\"html css\",\"javascript\",\"parallax\",\"parallax horizontal scrolling\",\"responsive design\",\"sticky-top\",\"template\",\"theming\",\"VSCode\"],\"articleSection\":[\"HTML &amp; CSS\"],\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/meeny.com\/?p=1163#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/meeny.com\/?p=1163\",\"url\":\"https:\/\/meeny.com\/?p=1163\",\"name\":\"Parallax horizontal scrolling ep02 - Meeny\",\"isPartOf\":{\"@id\":\"https:\/\/meeny.com\/?tag=ios-13-4-5\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/meeny.com\/?p=1163#primaryimage\"},\"image\":{\"@id\":\"https:\/\/meeny.com\/?p=1163#primaryimage\"},\"thumbnailUrl\":\"https:\/\/meeny.com\/wp-content\/uploads\/2020\/09\/parallax_t02.png\",\"datePublished\":\"2020-09-22T07:39:52+00:00\",\"dateModified\":\"2020-09-22T07:40:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/meeny.com\/?p=1163#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/meeny.com\/?p=1163\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/meeny.com\/?p=1163#primaryimage\",\"url\":\"https:\/\/meeny.com\/wp-content\/uploads\/2020\/09\/parallax_t02.png\",\"contentUrl\":\"https:\/\/meeny.com\/wp-content\/uploads\/2020\/09\/parallax_t02.png\",\"width\":1920,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/meeny.com\/?p=1163#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/meeny.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Parallax horizontal scrolling ep02\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/meeny.com\/?tag=ios-13-4-5\/#website\",\"url\":\"https:\/\/meeny.com\/?tag=ios-13-4-5\/\",\"name\":\"Meeny\",\"description\":\"Issues &amp; News\",\"publisher\":{\"@id\":\"https:\/\/meeny.com\/?tag=ios-13-4-5\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/meeny.com\/?tag=ios-13-4-5\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/meeny.com\/?tag=ios-13-4-5\/#organization\",\"name\":\"Meeny\",\"url\":\"https:\/\/meeny.com\/?tag=ios-13-4-5\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/meeny.com\/?tag=ios-13-4-5\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/meeny.com\/wp-content\/uploads\/2020\/05\/LOGO_meeny_180.png\",\"contentUrl\":\"https:\/\/meeny.com\/wp-content\/uploads\/2020\/05\/LOGO_meeny_180.png\",\"width\":180,\"height\":41,\"caption\":\"Meeny\"},\"image\":{\"@id\":\"https:\/\/meeny.com\/?tag=ios-13-4-5\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/meeny.com\/?tag=ios-13-4-5\/#\/schema\/person\/4b6b745d39f90b39161c79fe08a6feb9\",\"name\":\"Meeny\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/meeny.com\/?tag=ios-13-4-5\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c64cfa5c72bf22b037e8dce05c95e373?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c64cfa5c72bf22b037e8dce05c95e373?s=96&d=mm&r=g\",\"caption\":\"Meeny\"},\"sameAs\":[\"http:\/\/blog.epart.kr\"],\"url\":\"https:\/\/meeny.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Parallax horizontal scrolling ep02 - Meeny","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/meeny.com\/?p=1163","og_locale":"ko_KR","og_type":"article","og_title":"Parallax horizontal scrolling ep02 - Meeny","og_description":"Parallax horizontal scrolling ep02 &#8211; Bootstrap HTML JS SCSS","og_url":"https:\/\/meeny.com\/?p=1163","og_site_name":"Meeny","article_published_time":"2020-09-22T07:39:52+00:00","article_modified_time":"2020-09-22T07:40:02+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/meeny.com\/wp-content\/uploads\/2020\/09\/parallax_t02.png","type":"image\/png"}],"author":"Meeny","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Meeny","Est. reading time":"2\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/meeny.com\/?p=1163#article","isPartOf":{"@id":"https:\/\/meeny.com\/?p=1163"},"author":{"name":"Meeny","@id":"https:\/\/meeny.com\/?tag=ios-13-4-5\/#\/schema\/person\/4b6b745d39f90b39161c79fe08a6feb9"},"headline":"Parallax horizontal scrolling ep02","datePublished":"2020-09-22T07:39:52+00:00","dateModified":"2020-09-22T07:40:02+00:00","mainEntityOfPage":{"@id":"https:\/\/meeny.com\/?p=1163"},"wordCount":28,"commentCount":0,"publisher":{"@id":"https:\/\/meeny.com\/?tag=ios-13-4-5\/#organization"},"image":{"@id":"https:\/\/meeny.com\/?p=1163#primaryimage"},"thumbnailUrl":"https:\/\/meeny.com\/wp-content\/uploads\/2020\/09\/parallax_t02.png","keywords":["bootstrap","bootstrap css","bootstrap html","Bootstrap4 primary color change","Bootstrap4 theming","css","html","html code","html css","javascript","parallax","parallax horizontal scrolling","responsive design","sticky-top","template","theming","VSCode"],"articleSection":["HTML &amp; CSS"],"inLanguage":"ko-KR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/meeny.com\/?p=1163#respond"]}]},{"@type":"WebPage","@id":"https:\/\/meeny.com\/?p=1163","url":"https:\/\/meeny.com\/?p=1163","name":"Parallax horizontal scrolling ep02 - Meeny","isPartOf":{"@id":"https:\/\/meeny.com\/?tag=ios-13-4-5\/#website"},"primaryImageOfPage":{"@id":"https:\/\/meeny.com\/?p=1163#primaryimage"},"image":{"@id":"https:\/\/meeny.com\/?p=1163#primaryimage"},"thumbnailUrl":"https:\/\/meeny.com\/wp-content\/uploads\/2020\/09\/parallax_t02.png","datePublished":"2020-09-22T07:39:52+00:00","dateModified":"2020-09-22T07:40:02+00:00","breadcrumb":{"@id":"https:\/\/meeny.com\/?p=1163#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/meeny.com\/?p=1163"]}]},{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/meeny.com\/?p=1163#primaryimage","url":"https:\/\/meeny.com\/wp-content\/uploads\/2020\/09\/parallax_t02.png","contentUrl":"https:\/\/meeny.com\/wp-content\/uploads\/2020\/09\/parallax_t02.png","width":1920,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/meeny.com\/?p=1163#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/meeny.com\/"},{"@type":"ListItem","position":2,"name":"Parallax horizontal scrolling ep02"}]},{"@type":"WebSite","@id":"https:\/\/meeny.com\/?tag=ios-13-4-5\/#website","url":"https:\/\/meeny.com\/?tag=ios-13-4-5\/","name":"Meeny","description":"Issues &amp; News","publisher":{"@id":"https:\/\/meeny.com\/?tag=ios-13-4-5\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/meeny.com\/?tag=ios-13-4-5\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/meeny.com\/?tag=ios-13-4-5\/#organization","name":"Meeny","url":"https:\/\/meeny.com\/?tag=ios-13-4-5\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/meeny.com\/?tag=ios-13-4-5\/#\/schema\/logo\/image\/","url":"https:\/\/meeny.com\/wp-content\/uploads\/2020\/05\/LOGO_meeny_180.png","contentUrl":"https:\/\/meeny.com\/wp-content\/uploads\/2020\/05\/LOGO_meeny_180.png","width":180,"height":41,"caption":"Meeny"},"image":{"@id":"https:\/\/meeny.com\/?tag=ios-13-4-5\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/meeny.com\/?tag=ios-13-4-5\/#\/schema\/person\/4b6b745d39f90b39161c79fe08a6feb9","name":"Meeny","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/meeny.com\/?tag=ios-13-4-5\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c64cfa5c72bf22b037e8dce05c95e373?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c64cfa5c72bf22b037e8dce05c95e373?s=96&d=mm&r=g","caption":"Meeny"},"sameAs":["http:\/\/blog.epart.kr"],"url":"https:\/\/meeny.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/meeny.com\/index.php?rest_route=\/wp\/v2\/posts\/1163"}],"collection":[{"href":"https:\/\/meeny.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meeny.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meeny.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/meeny.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1163"}],"version-history":[{"count":1,"href":"https:\/\/meeny.com\/index.php?rest_route=\/wp\/v2\/posts\/1163\/revisions"}],"predecessor-version":[{"id":1166,"href":"https:\/\/meeny.com\/index.php?rest_route=\/wp\/v2\/posts\/1163\/revisions\/1166"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/meeny.com\/index.php?rest_route=\/wp\/v2\/media\/1165"}],"wp:attachment":[{"href":"https:\/\/meeny.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meeny.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1163"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meeny.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}