diff --git a/Animations-CSS/Glass fill animation/ReadMe.md b/Animations-CSS/Glass fill animation/ReadMe.md new file mode 100644 index 0000000000..70f973e804 --- /dev/null +++ b/Animations-CSS/Glass fill animation/ReadMe.md @@ -0,0 +1,3 @@ +# Glass fill animation + +This is an animation of a glass filling with water using CSS. \ No newline at end of file diff --git a/Animations-CSS/Glass fill animation/index.html b/Animations-CSS/Glass fill animation/index.html new file mode 100644 index 0000000000..cab94d673a --- /dev/null +++ b/Animations-CSS/Glass fill animation/index.html @@ -0,0 +1,13 @@ + + + + + + + Glass fill animation + + + +
+ + \ No newline at end of file diff --git a/Animations-CSS/Glass fill animation/style.css b/Animations-CSS/Glass fill animation/style.css new file mode 100644 index 0000000000..b591149ffe --- /dev/null +++ b/Animations-CSS/Glass fill animation/style.css @@ -0,0 +1,55 @@ +* { + margin: 0px; + padding: 0px; + box-sizing: border-box; +} + +body { + justify-content: center; + align-items: center; + min-height: 100vh; + display: flex; + background-color: black; +} + +.glass { + position: absolute; + top: 50%; + left: 50%; + width: 150px; + height: 180px; + border: 5px solid black; + border-radius: 20px; + border-top: 2px solid transparent; + border-top-left-radius: 5px; + border-top-right-radius: 5px; + transform: translate(-50%,-50%); + background: url(waterWave.jpg); + color: #ffffff; + font-size: 130px; + background-repeat: repeat-x; + animation: filling 5s linear infinite; + box-shadow: 0 0 0 6px #ffffff; +} + +@keyframes filling { + 0%{ + background-position: 0 100px; + } + + 10%{ + background-position: 0 100px; + } + + 40%{ + background-position: 1000px -70px; + } + + 80%{ + background-position: 2000px -80px; + } + + 100%{ + background-position: 2500px 100px; + } +} \ No newline at end of file diff --git a/Animations-CSS/Glass fill animation/waterWave.jpg b/Animations-CSS/Glass fill animation/waterWave.jpg new file mode 100644 index 0000000000..1d887e0a30 Binary files /dev/null and b/Animations-CSS/Glass fill animation/waterWave.jpg differ