我对SCSS很幼稚。我打算将html中的“数据占位符”以下代码转换为SCSS中的粗体:
<optic-select-input id="placeholder"data-placeholder="Choose or type
subject..." title = "Type your subject">
这是我在SCSS中所做的工作:
optic-select-input {
data-placeholder {
font-weight: bold;
}
}
但是,这没有显示任何影响。任何帮助将不胜感激。
最佳答案
::-webkit-input-placeholder { /* Chrome/Opera/Safari */
font-weight: bold;
}
::-moz-placeholder { /* Firefox 19+ */
font-weight: bold;
}
:-ms-input-placeholder { /* IE 10+ */
font-weight: bold;
}
:-moz-placeholder { /* Firefox 18- */
font-weight: bold;
}
关于https://css-tricks.com/snippets/css/style-placeholder-text/的更多信息
更新资料
Placeholder Mixin SCSS/CSS
关于html - 无法在SCSS中将占位符值转换为粗体,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/39625306/