Created
September 28, 2012 05:17
-
-
Save bundyo/3798051 to your computer and use it in GitHub Desktop.
Untitled
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
.container | |
{ | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
text-align: center; | |
} | |
.container:before, | |
.box | |
{ | |
display: inline-block; | |
vertical-align: middle; | |
} | |
.container:before | |
{ | |
content: ""; | |
width: 0; | |
margin-left: -10px; | |
height: 100%; | |
} | |
.box | |
{ | |
text-align: left; | |
background: #333; | |
width: 400px; | |
height: 300px; | |
border-radius: 1em; | |
border: 1px solid #fff; | |
background-clip: padding-box; | |
position: relative; | |
box-shadow: 0 0 5px rgba(0,0,0,.5); | |
} | |
.box:before | |
{ | |
content: ""; | |
display: block; | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
z-index: -1; | |
outline: 9999px solid rgba(0,0,0,.5); | |
outline-offset: -5px; | |
} |
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
Text | |
<div class="container"> | |
<div class="box"></div> | |
</div> |
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
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment