Преглед изворни кода

Change current position animation

Johannes Zellner пре 7 година
родитељ
комит
f1db0ebf25
1 измењених фајлова са 39 додато и 14 уклоњено
  1. 39 14
      public/index.css

+ 39 - 14
public/index.css

@@ -184,24 +184,49 @@ html, body {
     height: 128px;
 }
 
-@keyframes pulse_animation {
-    0%   { opacity: 0; transform: scale(0); }
-    5%   { opacity: 0.9; transform: scale(1); }
-    80%  { opacity: 0.9; transform: scale(1); }
-    100% { opacity: 0; transform: scale(10); }
+.current-location-icon {
+    height: 12px;
+    width: 12px;
+    background-color: #1e88e4;
+    border-radius: 100%;
 }
 
-.current-location-icon {
+@keyframes pulsate{
+    0% {
+        transform: scale(0);
+        opacity: .05;
+    }
+    20% {
+        transform: scale(1.5);
+        opacity: .1;
+    }
+    40% {
+        transform: scale(2.5);
+        opacity: .2;
+    }
+    60% {
+        transform: scale(3);
+        opacity: .3;
+    }
+    100% {
+        transform: scale(4);
+        opacity: 0;
+    }
+}
+
+.current-location-icon::after {
     position: absolute;
-    width: 10px;
-    height: 10px;
-    background-color: #0087ff;
-    border-radius: 5px;
-    animation-name: pulse_animation;
-    animation-duration: 4000ms;
-    transform-origin: 50% 50%;
+    top: 50%;
+    left: 50%;
+    display: block;
+    content: "";
+    height: 22px;
+    width: 22px;
+    margin: -10px 0 0 -10px;
+    animation: pulsate 2s linear;
     animation-iteration-count: infinite;
-    animation-timing-function: linear;
+    border-radius: 100%;
+    background-color: #1e88e4;
 }
 
 .current-location-icon-container {