Skip to content

Instantly share code, notes, and snippets.

@cochrancj
Created February 17, 2017 20:48
Show Gist options
  • Save cochrancj/e70f1057eaa58bdb45479c14fb7520a1 to your computer and use it in GitHub Desktop.
Save cochrancj/e70f1057eaa58bdb45479c14fb7520a1 to your computer and use it in GitHub Desktop.
#dailycssimages 27 - Icon Of Choice #2
<div class="container">
<div class="g-icon">
<div class="icon-box spin"></div>
<div class="g">
<h1>g</h1>
</div>
</div>
</div>
@import url('https://fonts.googleapis.com/css?family=Arima+Madurai:100');
* {
box-sizing: border-box;
}
body {
background-color: aliceblue;
}
h1 {
font-family: 'Arima Madurai', cursive;
font-size: 8em;
padding: 0;
margin: 0;
top: -10em;
/* background: -webkit-linear-gradient(#eee, #333);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent; */
background: -webkit-linear-gradient(#FFDAAF, #FFBD72, #ff7e03);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.container {
position: absolute;
margin: 0 auto;
}
.g-icon {
position: absolute;
margin: 0 5em
}
.icon-box {
width: 10em;
height: 10em;
background: -webkit-linear-gradient(snow, gainsboro);
position: relative;
top: 12.5em;
border-radius: 3em;
border: 0.5em solid #ccc;
-webkit-animation: rainbow-border 5s infinite alternate;
/* border-top-color: #333;
border-bottom-color: orange;
border-left-color: pink;
border-right-color: blue;
animation: spinner 3s linear infinite; */
}
/* .spin {
width: 5em;
height: 5em;
padding: 0;
}
.spin:hover {
color: #0eb7da;
}
.spin::before, .spin::after {
top: 0;
left: 0;
}
.spin::before {
border: 2px solid transparent;
}
.spin:hover::before {
border-top-color: #0eb7da;
border-right-color: #0eb7da;
border-bottom-color: #0eb7da;
-webkit-transition: border-top-color 0.15s linear, border-right-color 0.15s linear 0.1s, border-bottom-color 0.15s linear 0.2s;
transition: border-top-color 0.15s linear, border-right-color 0.15s linear 0.1s, border-bottom-color 0.15s linear 0.2s;
}
.spin::after {
border: 0 solid transparent;
}
.spin:hover::after {
border-top: 2px solid #0eb7da;
border-left-width: 2px;
border-right-width: 2px;
-webkit-transform: rotate(270deg);
transform: rotate(270deg);
-webkit-transition: border-left-width 0s linear 0.35s, -webkit-transform 0.4s linear 0s;
transition: border-left-width 0s linear 0.35s, -webkit-transform 0.4s linear 0s;
transition: transform 0.4s linear 0s, border-left-width 0s linear 0.35s;
transition: transform 0.4s linear 0s, border-left-width 0s linear 0.35s, -webkit-transform 0.4s linear 0s;
} */
.g {
position: absolute;
z-index: 2;
left: 3em;
}
/* @keyframes spinner {
to {transform: rotate(360deg);}
} */
@-webkit-keyframes rainbow-border {
0% {border-color: hsl(0, 100%, 50%);}
100% {border-color: hsl(255, 100%, 50%);}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment