[英]Mixin doesn't apply to an element, but the box-shadow does
I'm trying to add a box-shadow to an element via mixin, but it doesn't work.我正在尝试通过 mixin 向元素添加框阴影,但它不起作用。 When I put the box-shadow into the element, it works just fine, but won't take to the mixin.
当我将 box-shadow 放入元素时,它工作得很好,但不会进入 mixin。 Maybe I'm missing something small, but according to the guide on FreeCodeCamp, it should work just fine.
也许我遗漏了一些小东西,但根据 FreeCodeCamp 的指南,它应该可以正常工作。 Any help would be awesome
任何帮助都是极好的
@mixin project-drop-shadows($offsetX, $offsetY, $color) {
box-shadow: $offsetX, offsetY, $color;
-webkit-box-shadow: $offsetX, $offsetY, $color;
-moz-box-shadow: $offsetX, $offsetY, $color;
}
.project-tile{
@include project-drop-shadows(5px, 10px, yellow);
box-shadow: 5px 10px grey;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.