scss 使用HTML IE条件样式表,使用IE8和以下回退调整使用Sass mixin

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了scss 使用HTML IE条件样式表,使用IE8和以下回退调整使用Sass mixin相关的知识,希望对你有一定的参考价值。

$stylesheet: 'style';

@import 'rem-function';

.element {
  margin: rem(20);  
}
$base-font-size: 16;

@function rem ($pixels) {
  @if $stylesheet == 'ie' {
    @return $pixels + px;
  }
  else {
    @return ($pixels / $base-font-size) + rem;
  }
}
$stylesheet: 'ie';

@import 'rem-function';

.element {
  margin: rem(20);  
}

以上是关于scss 使用HTML IE条件样式表,使用IE8和以下回退调整使用Sass mixin的主要内容,如果未能解决你的问题,请参考以下文章