Created
February 7, 2012 22:59
-
-
Save gavinblair/1762726 to your computer and use it in GitHub Desktop.
"randomly" angled highlights
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
<p class='highlighted'> | |
<span>This is a line</span> | |
<span>This is a line</span> | |
<span>This is a line</span> | |
</p> |
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
.highlighted { | |
font-weight: bold; | |
} | |
.highlighted span { | |
display: block; | |
line-height: 1.6em; | |
position: relative; | |
} | |
.highlighted span:after { | |
-moz-transform: rotate(2deg); | |
background: none repeat scroll 0 0 #1BB5F5; | |
content: ""; | |
display: block; | |
height: 1em; | |
left: -0.5em; | |
padding: 0.3em 0; | |
position: absolute; | |
top: 0; | |
width: 100%; | |
z-index: -1; | |
} | |
.highlighted span:nth-child(2):after { | |
-moz-transform: rotate(-2deg); | |
} | |
.highlighted span:nth-child(3):after { | |
-moz-transform: rotate(3deg); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment