Skip to content

Instantly share code, notes, and snippets.

@Elvinz
Created May 31, 2020 10:28
Show Gist options
  • Save Elvinz/0c6eee8b3d9d7a9e6c464c631481de2f to your computer and use it in GitHub Desktop.
Save Elvinz/0c6eee8b3d9d7a9e6c464c631481de2f to your computer and use it in GitHub Desktop.
Rainbow
<link href="https://fonts.googleapis.com/css2?family=Parisienne&display=swap" rel="stylesheet">
<button class="rainbow noselect">Rainbow</button>
body {
height: 100vh;
overflow: hidden;
background-color: #63a4ff;
background-image: linear-gradient(315deg, #63a4ff 0%, #83eaf1 74%);
display: flex;
align-items: center;
justify-content: center;
}
.noselect {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.rainbow {
width: 150px;
height: 50px;
cursor: pointer;
font-family: 'Parisienne', cursive;
font-size: 30px;
color: white;
border: none;
box-shadow: inset 1px 1px 4px rgba(0,0,0,0.6), inset -1px -1px 4px rgba(255,255,255,0.2);
border-radius: 5px;
background-color: #63a4ff;
background-image: linear-gradient(315deg, #63a4ff 0%, #83eaf1 74%);
-webkit-tap-highlight-color: transparent;
}
.rainbow:hover {
animation: rainbow 3s infinite linear;
}
@keyframes rainbow {
to {
filter: hue-rotate(360deg);
}
}
.rainbow:focus {
outline: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment