{"id":2062,"date":"2019-04-04T12:24:21","date_gmt":"2019-04-04T11:24:21","guid":{"rendered":"https:\/\/solidt.eu\/site\/?p=2062"},"modified":"2019-04-04T12:25:31","modified_gmt":"2019-04-04T11:25:31","slug":"css-wave-animation","status":"publish","type":"post","link":"https:\/\/solidt.eu\/site\/css-wave-animation\/","title":{"rendered":"CSS Wave animation"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/solidt.eu\/site\/wp-content\/uploads\/2019\/04\/wave.svg\" alt=\"\" class=\"wp-image-2063\"\/><\/figure>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"html\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;div class=\"ocean\">\n    &lt;div class=\"ocean-level\">\n        &lt;div class=\"wave\">&lt;\/div>\n        &lt;div class=\"wave\">&lt;\/div>\n    &lt;\/div>\n&lt;\/div><\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"css\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">.ocean { \n    position:absolute;\n    top:0;\n    left:0;\n    height: 100vh;\n    width:100vw;    \n    z-index:0;\n    overflow:hidden;\n}\n\n.ocean-level {\n    position:absolute;\n    bottom:0;\n    left:0;\n    height:60vh;\n    width:100%;\n    background: #4e8cff;\n    z-index:0;\n    animation: ani_updown 20s cubic-bezier( 0.36, 0.45, 0.63, 0.53) infinite;\n    transform: translate3d(0, 0, 0);\n}\n\n.wave {\n    background: url(wave.svg) repeat-x; \n    position: absolute;\n    top: -198px;\n    width: 6000px;\n    height: 500px;\n    animation: ani_wave 10s cubic-bezier( 0.36, 0.45, 0.63, 0.53) infinite;\n    transform: translate3d(0, 0, 0);\n}\n\n.wave:nth-of-type(2) {\n    top: -175px;\n    animation: ani_wave 10s cubic-bezier( 0.36, 0.45, 0.63, 0.53) -.125s infinite, ani_swell 10s ease -1.25s infinite;\n    opacity: 1;\n}\n\n@keyframes ani_updown {\n    0% {\n        transform: translateY(0vh);\n    }\n    90% {\n        transform: translateY(40vh);\n    }\n    100% {\n        transform: translateY(0vh);\n    }\n}\n\n@keyframes ani_wave {\n    0% {\n        margin-left: 0;\n    }\n    100% {\n        margin-left: -3000px;\n    }\n}\n\n@keyframes ani_swell {\n    0%, 100% {\n        transform: translate3d(0,-25px,0);\n    }\n    50% {\n        transform: translate3d(0,5px,0);\n    }\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2062","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/2062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/comments?post=2062"}],"version-history":[{"count":2,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/2062\/revisions"}],"predecessor-version":[{"id":2065,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/2062\/revisions\/2065"}],"wp:attachment":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/media?parent=2062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/categories?post=2062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/tags?post=2062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}