Html 浮动标签不';我不能在Firefox上工作
我的浮动标签在Firefox上不起作用。在镀铬上一切正常,就像你在印花上看到的那样 我的代码如下:Html 浮动标签不';我不能在Firefox上工作,html,css,angular,typescript,primeng,Html,Css,Angular,Typescript,Primeng,我的浮动标签在Firefox上不起作用。在镀铬上一切正常,就像你在印花上看到的那样 我的代码如下: <div class="col-md-6 col-sm-6 form-group"> <span class="ui-float-label"> <textarea pInputTextarea [(ngModel)]="consulta.dsDiagnostico1"
<div class="col-md-6 col-sm-6 form-group">
<span class="ui-float-label">
<textarea pInputTextarea [(ngModel)]="consulta.dsDiagnostico1" name="dsDiagnostico1" id="diagnostico1" style="resize:none"
rows="4" cols="100"
class="form-control" maxLength="4000"></textarea>
<label for="diagnostico1">Diagnóstico 1</label>
</span>
</div>
Diagnostico 1
这是一个组件:
在Chrome中键入后:
在Firefox中键入后:
任何人都知道一个不错的解决方案,它不会“静态”标签,并允许Firefox上的float label正确运行?在遇到同样的问题后,我找到了解决这个问题的方法,在css文件中这样做,标签将在Firefox中正常工作。这是一个解决方案,但目前还没有PrimeNG团队提供的修复方案
.ui-float-label>input:focus~label, .ui-float-label>input.ui-state-filled~label, .ui-float-label>.ui-inputwrapper-focus~label, .ui-float-label>.ui-inputwrapper-filled~label { top: -.75em; font-size: 12px; }
.ui-float-label>textarea:focus~label, .ui-float-label>textarea.ui-state-filled~label, .ui-float-label>.ui-textareawrapper-focus~label, .ui-float-label>.ui-textareawrapper-filled~label { top: -.75em; font-size: 12px; }