Skip to content

Instantly share code, notes, and snippets.

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