Last active
February 16, 2016 13:36
-
-
Save chyngyz/cef75aed65432b714960 to your computer and use it in GitHub Desktop.
Mouse Scroll Icon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@-webkit-keyframes mouse-wheel { | |
0% { | |
-webkit-transform: scaleY(.4)translateY(); | |
transform: scaleY(.4)translateY(); | |
} | |
20% { | |
-webkit-transform: scaleY(1)translateY(); | |
transform: scaleY(1)translateY(); | |
} | |
60% { | |
-webkit-transform: scaleY(.4)translateY(12px); | |
transform: scaleY(.4)translateY(12px); | |
} | |
100% { | |
-webkit-transform: scaleY(.4)translateY(); | |
transform: scaleY(.4)translateY(); | |
} | |
} | |
@keyframes mouse-wheel { | |
0% { | |
-webkit-transform: scaleY(.4)translateY(); | |
transform: scaleY(.4)translateY(); | |
} | |
20% { | |
-webkit-transform: scaleY(1)translateY(); | |
transform: scaleY(1)translateY(); | |
} | |
60% { | |
-webkit-transform: scaleY(.4)translateY(12px); | |
transform: scaleY(.4)translateY(12px); | |
} | |
100% { | |
-webkit-transform: scaleY(.4)translateY(); | |
transform: scaleY(.4)translateY(); | |
} | |
} | |
.mouse { | |
position: absolute; | |
box-sizing: border-box; | |
left: 50%; | |
bottom: 35px; | |
width: 30px; | |
margin-left: -15px; | |
height: 48px; | |
border-radius: 15px; | |
border: 2px solid #000; | |
-webkit-transform: translateZ(); | |
transform: translateZ(); | |
} | |
@media (max-width:767px) { | |
.mouse { display: none } | |
} | |
.m-touch .mouse { display: none } | |
.mouse__wheel { | |
position: absolute; | |
left: 50%; | |
top: 8px; | |
margin-left: -2px; | |
width: 4px; | |
height: 9px; | |
background: #000; | |
border-radius: 2px; | |
-webkit-animation: mouse-wheel 1.25s infinite linear; | |
animation: mouse-wheel 1.25s infinite linear; | |
-webkit-transform-origin: 50% 0%; | |
-ms-transform-origin: 50% 0%; | |
transform-origin: 50% 0%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment