Created
August 25, 2014 15:36
-
-
Save harapeko/4755b4bce10fb79ed59d to your computer and use it in GitHub Desktop.
ヾ(o゚ω゚o)ノ゙css3でテキストに境界線をつけよう! ref: http://qiita.com/harapeko_wktk/items/48972185efda8ba62280
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
text-shadow:#333 2px 2px 0px, | |
#333 -2px 2px 0px, | |
#333 2px -2px 0px, | |
#333 -2px -2px 0px; | |
filter:dropshadow(color=$color,offX= 0,offY=-2) | |
dropshadow(color=$color,offX= 2,offY= 0) | |
dropshadow(color=$color,offX= 0,offY= 2) | |
dropshadow(color=$color,offX=-2,offY= 0); |
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
@mixin text_outline($color){ | |
text-shadow: $color 2px 2px 0px, $color -2px 2px 0px, | |
$color 2px -2px 0px, $color -2px -2px 0px; | |
/* for IE */ | |
filter:dropshadow(color=$color,offX= 0,offY=-2) | |
dropshadow(color=$color,offX= 2,offY= 0) | |
dropshadow(color=$color,offX= 0,offY= 2) | |
dropshadow(color=$color,offX=-2,offY= 0); | |
} |
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
.test { | |
@include text_outline(#333); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment