scss HANDY MIXINS
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了scss HANDY MIXINS相关的知识,希望对你有一定的参考价值。
// HIDE but remain accessible for screen readers
//
@mixin visuallyhidden {
border: 0 !important;
clip: rect(0 0 0 0) !important;
height: 1px !important;
margin: -1px !important;
overflow: hidden !important;
padding: 0 !important;
position: absolute !important;
width: 1px !important;
}
// Center Block
//
@mixin center-block {
display: block;
margin-left: auto;
margin-right: auto;
}
// Easy horizontal & vertical centering of anything in IE9+
//
@mixin absolute-center {
position: absolute;
top: 50%;
left: 50%;
transform: translate( -50%, -50% );
}
// Easy vertical centering of anything in IE9+
//
@mixin vertical-center {
position: absolute;
top: 50%;
transform: translateY( -50% );
}
// STYLING SELECTED TEXT
// use like this: @include selection( #000, #ccc );
@mixin selection( $background, $foreground:#fff ) {
::-moz-selection {
background: $background;
color: $foreground;
text-shadow: none;
}
::selection {
background: $background;
color: $foreground;
text-shadow: none;
}
}
以上是关于scss HANDY MIXINS的主要内容,如果未能解决你的问题,请参考以下文章
scss HANDY MIXINS
scss HANDY MIXINS
scss 来自网络的Handy Sass资源
scss Mixins.scss
scss CSS-断点,mixins.scss
scss SCSS MIXINS