@mixin fit-content() { width: -webkit-fit-content; width: -moz-fit-content; width: -o-fit-content; width: -ms-fit-content; width: fit-content; } //define transform skewX() @mixin skewX($degrees){ -webkit-transform: skewX($degrees); -moz-transform: skewX($degrees); -o-transform: skewX($degrees); -ms-transform: skewX($degrees); transform: skewX($degrees); }
li { background: #34495e; float: left; @include skewX(25deg);//调用skewX(),并传参数值25deg &:hover { background: #e74c3c; }
时间: 2024-10-05 21:40:27