Skip to content

Instantly share code, notes, and snippets.

@Cartman0
Created September 21, 2015 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Cartman0/b41ef0376ca881ae32bf to your computer and use it in GitHub Desktop.
Save Cartman0/b41ef0376ca881ae32bf to your computer and use it in GitHub Desktop.
cssで縦縞(vertical-stripes)
@mixin backgound-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 vertical-stripes($width: 100px, $height: 100px, $color1: black, $color2: white, $sima_num: 5){
width: $width;
height: $height;
@include backgound-linear-gradient(left, $color1, $color1 50%, $color2 50%, $color2);
@include background-size($width / $sima_num $height);
}
.vertical-stripes {
$width: 100px;
$height: 100px;
$color1: black;
$color2: white;
$num: 5;
@include vertical-stripes($width, $height, $color1, $color2, $num);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment