-2
我有这个在我的HTML:重点标签焦点不工作
<label class="control-label" for="firstName">{{ 'OA_FIRST_NAME' | translate | uppercase }}<sup>*</sup></label>
<input
formControlName="firstName"
class="signup-input full-width"
type="text"
name="firstName"
required>
而这在我的SCSS:
input[name=firstName]:focus {
background-color: blue !important;
label[for=firstName] {
background-color: red !important;
color: green !important;
}
}
蓝色背景的输入工作,但是标签不完全改变。我做错了吗?
所以有没有输入之前具有标签这项工作的方法是什么? – georgej
@georgej你会需要js,因为我相信。 – Stickers