Created
March 8, 2017 09:28
-
-
Save lichenbuliren/79180a190d52d545427669d45a1f1fbf to your computer and use it in GitHub Desktop.
文字 3D 立体效果
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-3d($color: white, $depth: 5) { | |
$shadows: (); | |
$shadow-color: $color; | |
@for $i from 1 through $depth { | |
$shadow-color: darken($shadow-color, 10%); | |
$shadows: append($shadows, 0 ($i * 1px) $shadow-color, comma); | |
} | |
color: $color; | |
// 关键,最后添加一个黑色的阴影 | |
text-shadow: append($shadows, 0 ($depth * 1px) 10px black, comma); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment