文本和框上的阴影具有不同的 Y 位置
Shadow on text and on box have not the same Y position
我正在使用一个函数在文本或 html 标签上生成梯度阴影。
而且我不明白为什么阴影的角度不一样。
为了在 HTML 标签上获得相同的结果,我必须将阴影的 y 位置除以 2(你必须在 Codepen example查看结果)
// @if($i) {
// $y: $i/2;
// }
长得像
行评论
行未注释
我用@Vinc199789 评论回答了这个问题:
"I think that is because you rotated you right div and that he is calculating from your rotated position."
我正在使用一个函数在文本或 html 标签上生成梯度阴影。 而且我不明白为什么阴影的角度不一样。
为了在 HTML 标签上获得相同的结果,我必须将阴影的 y 位置除以 2(你必须在 Codepen example查看结果)
// @if($i) {
// $y: $i/2;
// }
长得像
行评论
行未注释
我用@Vinc199789 评论回答了这个问题:
"I think that is because you rotated you right div and that he is calculating from your rotated position."