{"id":3607,"date":"2021-01-18T05:34:33","date_gmt":"2021-01-18T05:34:33","guid":{"rendered":"https:\/\/rengga.dev\/blog\/?p=3607"},"modified":"2023-02-28T05:36:26","modified_gmt":"2023-02-28T05:36:26","slug":"css-tutorial-simple-css-waves","status":"publish","type":"post","link":"https:\/\/rengga.dev\/blog\/css-tutorial-simple-css-waves\/","title":{"rendered":"CSS Tutorial &#8211; Simple CSS Waves"},"content":{"rendered":"<p><span style=\"color: #ef3207;\"><a style=\"color: #ef3207;\" href=\"https:\/\/rengga.dev\/\" target=\"_blank\" rel=\"noopener\"><strong>Rengga Dev<\/strong><\/a> <\/span>&#8211; CSS Tutorial &#8211; Lightweight animation between header &amp; content. Easy to customize and apply to any website! Works with all devices and screen sizes.<\/p>\n<p><iframe style=\"width: 100%;\" title=\"CSS Tutorial - Simple CSS Waves\" src=\"https:\/\/codepen.io\/renggagumilar\/embed\/OJwLdzV?default-tab=result&amp;theme-id=dark\" height=\"700\" frameborder=\"no\" scrolling=\"no\" allowfullscreen=\"allowfullscreen\"><br \/>\nSee the Pen <a href=\"https:\/\/codepen.io\/renggagumilar\/pen\/OJwLdzV\"><br \/>\nCSS Tutorial &#8211; Simple CSS Waves<\/a> by Rengga Gumilar (<a href=\"https:\/\/codepen.io\/renggagumilar\">@renggagumilar<\/a>)<br \/>\non <a href=\"https:\/\/codepen.io\">CodePen<\/a>.<br \/>\n<\/iframe><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"css\">@import url(\/\/fonts.googleapis.com\/css?family=Lato:300:400);\r\n\r\nbody {\r\n  margin:0;\r\n}\r\n\r\nh1 {\r\n  font-family: 'Lato', sans-serif;\r\n  font-weight:300;\r\n  letter-spacing: 2px;\r\n  font-size:48px;\r\n}\r\np {\r\n  font-family: 'Lato', sans-serif;\r\n  letter-spacing: 1px;\r\n  font-size:14px;\r\n  color: #333333;\r\n}\r\n\r\n.header {\r\n  position:relative;\r\n  text-align:center;\r\n  background: linear-gradient(60deg, rgba(84,58,183,1) 0%, rgba(0,172,193,1) 100%);\r\n  color:white;\r\n}\r\n.logo {\r\n  width:50px;\r\n  fill:white;\r\n  padding-right:15px;\r\n  display:inline-block;\r\n  vertical-align: middle;\r\n}\r\n\r\n.inner-header {\r\n  height:65vh;\r\n  width:100%;\r\n  margin: 0;\r\n  padding: 0;\r\n}\r\n\r\n.flex { \/*Flexbox for containers*\/\r\n  display: flex;\r\n  justify-content: center;\r\n  align-items: center;\r\n  text-align: center;\r\n}\r\n\r\n.waves {\r\n  position:relative;\r\n  width: 100%;\r\n  height:15vh;\r\n  margin-bottom:-7px; \/*Fix for safari gap*\/\r\n  min-height:100px;\r\n  max-height:150px;\r\n}\r\n\r\n.content {\r\n  position:relative;\r\n  height:20vh;\r\n  text-align:center;\r\n  background-color: white;\r\n}\r\n\r\n\/* Animation *\/\r\n\r\n.parallax &gt; use {\r\n  animation: move-forever 25s cubic-bezier(.55,.5,.45,.5)     infinite;\r\n}\r\n.parallax &gt; use:nth-child(1) {\r\n  animation-delay: -2s;\r\n  animation-duration: 7s;\r\n}\r\n.parallax &gt; use:nth-child(2) {\r\n  animation-delay: -3s;\r\n  animation-duration: 10s;\r\n}\r\n.parallax &gt; use:nth-child(3) {\r\n  animation-delay: -4s;\r\n  animation-duration: 13s;\r\n}\r\n.parallax &gt; use:nth-child(4) {\r\n  animation-delay: -5s;\r\n  animation-duration: 20s;\r\n}\r\n@keyframes move-forever {\r\n  0% {\r\n   transform: translate3d(-90px,0,0);\r\n  }\r\n  100% { \r\n    transform: translate3d(85px,0,0);\r\n  }\r\n}\r\n\/*Shrinking for mobile*\/\r\n@media (max-width: 768px) {\r\n  .waves {\r\n    height:40px;\r\n    min-height:40px;\r\n  }\r\n  .content {\r\n    height:30vh;\r\n  }\r\n  h1 {\r\n    font-size:24px;\r\n  }\r\n}<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Rengga Dev &#8211; CSS Tutorial &#8211; Lightweight animation between header &amp; content. <a class=\"read-more\" href=\"https:\/\/rengga.dev\/blog\/css-tutorial-simple-css-waves\/\" title=\"CSS Tutorial &#8211; Simple CSS Waves\" itemprop=\"url\"><\/a><\/p>\n","protected":false},"author":1,"featured_media":3609,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[356,355,103,227],"newstopic":[],"class_list":{"0":"post-3607","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-html-css","8":"tag-mobile-css","9":"tag-mobile-navigation-concept","10":"tag-web-design","11":"tag-web-designer"},"_links":{"self":[{"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/posts\/3607","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/comments?post=3607"}],"version-history":[{"count":6,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/posts\/3607\/revisions"}],"predecessor-version":[{"id":3833,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/posts\/3607\/revisions\/3833"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/media\/3609"}],"wp:attachment":[{"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/media?parent=3607"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/categories?post=3607"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/tags?post=3607"},{"taxonomy":"newstopic","embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/newstopic?post=3607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}