css SCSS和CSS中的纯CSS交叉。

Posted

tags:

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

// Mixins and Variables are being used from this gist:
//   https://gist.github.com/zeshanshani/c4d5ae43e6a9f661d012
// Bourbon.io is also a dependency. 
// For it's CSS generated output, look at the second file below. 

$size: 22px;
position: relative;
@include size-rem( $size );

&:before,
&:after {
  content: '';
  @include size-rem( $size 1px );
  @include transform( rotate( 45deg ) );
  background-color: #fff;
  position: absolute;
  display: block;
  @include margin( $size / 2, 'top' ); // to align center the lines vertically
}

&:after {
  @include transform( rotate( -45deg ) );
}
.element {
  position: relative;
  height: 22px;
  height:  2.2rem;
  width: 22px;
  width:  2.2rem;
}
.element:before, .element:after {
  content: '';
  height: 1px;
  height:  0.1rem;
  width: 22px;
  width:  2.2rem;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
  background-color: #fff;
  position: absolute;
  display: block;
  margin-top: 11px;
  margin-top:  1.1rem;
}
.element:after {
  -webkit-transform: rotate(-45deg);
  -ms-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

以上是关于css SCSS和CSS中的纯CSS交叉。的主要内容,如果未能解决你的问题,请参考以下文章

如何在顺风 css 中使用颜色或 css/scss 中的材质 ui

来自 Fluent Design System 的纯 CSS 丙烯酸材料

如何在子组件 scss 文件中覆盖 main.component.scss 中的 css

application.css.scss 中的 Require 语句

带有视频背景的纯 CSS 视差效果

CSS/SCSS/bootstrap :: 覆盖 bootstrap 中的打印设置 :: 更改背景:透明!对颜色很重要