scss 跨浏览器占位符sass mixin

Posted

tags:

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

@mixin placeholder() { // using a mixing cause extending a class will result in parse failure
  // your styles go here
}

[placeholder] {@include placeholder()}
:-moz-placeholder {@include placeholder()}
::-moz-placeholder {@include placeholder()}
:-ms-input-placeholder {@include placeholder()}
::-o-placeholder {@include placeholder()}
::-webkit-input-placeholder {@include placeholder()}

以上是关于scss 跨浏览器占位符sass mixin的主要内容,如果未能解决你的问题,请参考以下文章

scss 跨浏览器占位符sass mixin

scss 输入占位符crossbrowser mixin sass

scss sass general mixins响应字体面占位符

scss SASS:跨媒体查询占位符

scss Sass - Mixins:跨浏览器不透明度

scss 占位符mixin scss