<article class="box weather">
<div class="icon bubble black">
<div class="spin">
<img src="https://dl.dropbox.com/s/0qq5anxliaopt8d/sun.png">
</div>
</div>
<h1>Monday</h1>
<span class="temp">23°</span>
<span class="high-low">15°/ 28°</span>
</article>
@import "compass/css3";
html{
font-family: 'Roboto Slab', sans-serif;
}
body{
background: #55D6F4;
color: #313E48;
}
img{
max-width: 100%;
}
.box{
margin: 1em auto;
background: #f0f0f0;
padding: 2em 0;
width: 300px;
border-radius: 3px;
box-shadow: 0px 1px 7px rgba(0,0,0, 0.25);
&:hover{
box-shadow: 0px 1px 4px rgba(0,0,0, 0.5);
}
h1{
font-size: 2em;
text-align: center;
}
.temp{
font-size: 7em;
line-height: 1;
text-align: center;
display: block;
padding-left: 30px;
margin-bottom: 24px;
}
.high-low{
font-size: 2em;
color: lighten(#313E48, 20%);
text-align: center;
display: block;
font-weight: 100;
}
}
.weather .icon{
position: relative;
margin: 0 auto;
}
.spin{
position: absolute;
top: 16px;
right: 18px;
text-align: center;
width: 65px;
}
.bubble.black {
background-color: #313E48;
position: relative;
width: 100px;
height: 100px;
padding: 0px;
border-radius: 50px;
border-radius: 50px;
border-radius: 50px;
}
.bubble.black:after {
content: "";
position: absolute;
bottom: -14px;
left: 14px;
border-style: solid;
border-width: 29px 15px 0;
border-color: #313E48 transparent;
display: block;
width: 0;
z-index: 1;
transform: rotate(30deg);
}
//Animation
.spin img{
animation: spin 5s linear infinite;
animation-play-state: paused;
}
.box:hover .spin img{
animation-play-state: running;
}
@keyframes spin {
100% {
transform: rotate(1turn);
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.