Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
cssで横縞(horizontal-stripes)
@mixin background-linear-gradient($value...){
background: -moz-linear-gradient($value);
background: -webkit-linear-gradient($value);
background: linear-gradient($value);
}
@mixin background-size($value...){
-moz-background-size: $value;
-webkit-background-size: $value;
background-size: $value;
}
@mixin horizontal-stripes($width: 100px, $height: 100px, $color1: black, $color2: white, $sima_num: 5){
width: $width;
height: $height;
@include background-linear-gradient(top, $color1, $color1 50%, $color2 50%, $color2);
@include background-size($width $height/ $sima_num);
}
.horizontal-stripes {
$width: 100px;
$height: 100px;
$color1: black;
$color2: white;
$num: 5;
@include horizontal-stripes($width, $height, $color1, $color2, $num);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment