scss SCSS MIXINS

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了scss SCSS MIXINS相关的知识,希望对你有一定的参考价值。

@mixin trans($selector:all,$duration:0.3s){
  -webkit-transition: $selector $duration ease-in;
  -moz-transition:    $selector $duration ease-in;
  -ms-transition:     $selector $duration ease-in;
  -o-transition:      $selector $duration ease-in;
  transition:         $selector $duration ease-in;
}

@mixin trans-cubic($selector:all,$duration:0.3s){
  -webkit-transition: $selector $duration cubic-bezier(0.18, 0.89, 0.32, 1.28);
  -moz-transition:    $selector $duration cubic-bezier(0.18, 0.89, 0.32, 1.28);
  -ms-transition:     $selector $duration cubic-bezier(0.18, 0.89, 0.32, 1.28);
  -o-transition:      $selector $duration cubic-bezier(0.18, 0.89, 0.32, 1.28);
  transition:         $selector $duration cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
@mixin flexbox{
    display: -webkit-box;
	display: -webkit-flex;
	display: -moz-flex;
	display: -ms-flexbox;
	display: flex;
}
@mixin knopkleur($color,$background,$border:''){
  color:        $color;
  border-color: $background;
  background:   $background;
  &:hover{
	color:        $background;
	border-color: $background;
	background:   $color;
  }
  &.invert{
	color:        $background;
	border-color: $background;
	background:   $color;
	&:hover{
	  color:        $color;
	  border-color: $background;
	  background:   $background;
	}
  }
  @if $border != ''{
	border-color: $color;
  }
}
@mixin desktop(){
  @media (min-width:$screen-lg-min){
	@content
  }
}
@mixin tablet(){
  @media (min-width: $screen-sm-max) and (max-width: $screen-md-max){
	@content
  }
}
@mixin mobile(){
	@media (max-width: $screen-xs-max){
	  @content
	}
}

以上是关于scss SCSS MIXINS的主要内容,如果未能解决你的问题,请参考以下文章

scss SCSS MIXINS

scss 断点scss mixins

scss mixins.scss

scss CSS-断点,mixins.scss

scss CSS-断点,mixins.scss

scss CSS-断点,mixins.scss