Created
January 11, 2014 17:15
-
-
Save tddewey/8373693 to your computer and use it in GitHub Desktop.
Animated porthole
This file contains 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
/** | |
* Animated porthole | |
*/ | |
@-webkit-keyframes rotate { | |
from { | |
-webkit-transform: rotate(0deg); | |
} | |
to { | |
-webkit-transform: rotate(360deg); | |
} | |
} | |
body { | |
background-color: #ececec; | |
text-align: center; | |
margin-top: 50px; | |
} | |
.porthole { | |
position: relative; | |
width: 250px; | |
margin-left: auto; | |
margin-right: auto; | |
} | |
.porthole:before { | |
content:' '; | |
position: absolute; | |
width: 250px; | |
height: 250px; | |
left: -19px; | |
top: -19px; | |
background-color: rgba(0, 0, 255, .5); | |
border-radius: 50%; | |
box-shadow: 0 0 50px rgba(255, 255, 255, .8); | |
background: linear-gradient(135deg, #f5f6f6 0%, #dbdce2 12%, #8e9699 32%, #dddfe3 59%, #b8bac6 75%, #f5f6f6 100%); | |
/* W3C */ | |
-webkit-animation-name: rotate; | |
-webkit-animation-duration: 50s; | |
-webkit-animation-iteration-count: infinite; | |
-webkit-animation-timing-function: linear; | |
} | |
.porthole:after { | |
content:' '; | |
left: 0; | |
top: 0; | |
position: absolute; | |
border-radius: 50%; | |
width: 210px; | |
height: 210px; | |
border: 2px solid #d2d4da; | |
box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.8); | |
background-image: url(http://10up.com/wp-content/uploads/2013/12/BrainUp-Announcement-v6.jpg); | |
} |
This file contains 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
<div class="porthole"></div> |
This file contains 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
// alert('Hello world!'); |
This file contains 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
{"view":"split-vertical","fontsize":"80","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment