From 1d53596559b6b30ce9b6c03ba206b329bbca36c5 Mon Sep 17 00:00:00 2001 From: jkoschke Date: Wed, 10 Mar 2021 23:02:50 +0100 Subject: [PATCH] initial commit --- README.md | 5 ++ README.md~ | 0 index.html | 21 ++++++++ style.css | 150 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 176 insertions(+) create mode 100644 README.md create mode 100644 README.md~ create mode 100644 index.html create mode 100644 style.css diff --git a/README.md b/README.md new file mode 100644 index 0000000..54f7258 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Beer SVG Animation + +This is a snipped for an animated beer mug only with svg and css. + +Forked from [https://codepen.io/Everytime/pen/RZMeKy](https://codepen.io/Everytime/pen/RZMeKy) diff --git a/README.md~ b/README.md~ new file mode 100644 index 0000000..e69de29 diff --git a/index.html b/index.html new file mode 100644 index 0000000..9bd90f7 --- /dev/null +++ b/index.html @@ -0,0 +1,21 @@ + + + + + + + + + + + diff --git a/style.css b/style.css new file mode 100644 index 0000000..1432c35 --- /dev/null +++ b/style.css @@ -0,0 +1,150 @@ +body { + background: #131313; +} +.lines { + fill: none; + stroke: #4d4d4d; + stroke-width: 10; + stroke-linecap: round; + stroke-linejoin: round; + stroke-miterlimit: 10; +} +.schaum { + fill: #F15A24; +} +.outline { + fill: none; + stroke: #4d4d4d; + stroke-width: 10; + stroke-linecap: round; + stroke-linejoin: round; + stroke-miterlimit: 10; +} +.beer { + fill: #FF00FF; +} +.handle { + fill: none; + stroke: #4d4d4d; + stroke-width: 10; + stroke-linecap: round; + stroke-linejoin: round; + stroke-miterlimit: 10; +} + +/*** Animation ***/ +/* Outline */ +.outline { + stroke-dasharray: 1500; + stroke-dashoffset: 1500; + animation: outlinedash 6s linear infinite; +} + +@keyframes outlinedash { + 5% { + stroke-dashoffset: 1500; + } + 45% { + stroke-dashoffset: 0; + } + 55% { + stroke-dashoffset: 0; + } + 95% { + stroke-dashoffset: 1500; + } +} + +/* Handle */ +.handle { + stroke-dasharray: 300; + stroke-dashoffset: 300; + animation: handledash 6s linear infinite; +} + +@keyframes handledash { + 10% { + stroke-dashoffset: 300; + } + 20% { + stroke-dashoffset: 300; + } + 23% { + stroke-dashoffset: 0; + } + 50% { + stroke-dashoffset: 0; + } + 77% { + stroke-dashoffset: 0; + } + 80% { + stroke-dashoffset: 300; + } + 90% { + stroke-dashoffset: 300; + } +} + +/* Lines */ +.lines { + stroke-dasharray: 100; + stroke-dashoffset: 100; + animation: linedash 6s linear infinite; +} + +@keyframes linedash { + 5% { + stroke-dashoffset: 100; + } + 10% { + stroke-dashoffset: 0; + } + 90% { + stroke-dashoffset: 0; + } + 95% { + stroke-dashoffset: 100; + } +} + +/* Schaum */ +.schaum { + fill: #131313; + animation: fillschaum 6s linear infinite; +} + +@keyframes fillschaum { + 40% { + fill: #131313; + } + 45% { + fill: #FFFFFF; + } + 55% { + fill: #FFFFFF; + } + 60% { + fill: #131313; + } +} + +/* Beer */ +.beer { + fill: #131313; + animation: fillbeer 6s linear infinite; +} +@keyframes fillbeer { + 40% { + fill: #131313; + } + 45% { + fill: #DEB712; + } + 55% { + fill: #DEB712; + } + 60% { + fill: #131313; + } +}