Created
December 6, 2012 19:34
-
-
Save not-only-code/4227582 to your computer and use it in GitHub Desktop.
stitched-effect
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 { | |
margin: 50px auto; | |
} | |
/** | |
* stitched-effect | |
*/ | |
.stitched-effect { | |
position: relative; | |
width: 300px; | |
height: 120px; | |
background:linear-gradient(top, #c00, #900); | |
border-radius: 10px; | |
box-shadow: 1px 1px 5px rgba(0,0,0,.6); | |
z-index: 0; | |
} | |
.stitched-effect:before, | |
.stitched-effect:after { | |
position: absolute; | |
content: ' '; | |
z-index: -1; | |
top: 3px; | |
right: 3px; | |
bottom: 3px; | |
left: 3px; | |
border-radius: 7px; | |
border: dashed 1px #ccc; | |
} | |
.stitched-effect:after { | |
top: 2px; | |
right: 4px; | |
bottom:4px; | |
left: 2px; | |
border-color: rgba(0,0,0,.5); | |
} | |
.blue { color: #CCF5F3} | |
.stitched-effect { | |
padding: 14px; | |
font: normal 24px/1.25em 'Myriad Pro', 'Trebuchet MS', Helvetica, Arial; | |
color: beige; | |
text-shadow: 1px 1px 0 rgba(0,0,0,.5); | |
} | |
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="stitched-effect"> | |
This is an example of <strong class="blue">Stitched Effect</strong> using <span class="blue">:before</span> and <span class="blue">:after</span> pseudo-classes and absolute positioning | |
</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","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