如果textField与中心对齐,则在取消选中时,其文本会转到最右边的角落。就像它正确对齐时一样。 (尝试了getUnselectedStyles()。setAlignment,另外使用了带有flowlayout,boxlayout,borderlayout等的父容器),这是一个错误吗?
<div style="position:absolute;
min-height:100%; width: 100%">
<div style="max-width: 100%; overflow-x: hidden; overflow-y:hidden; margin: 0 auto">
<nav class="toolbar">
<div class="nav-wrapper">
<a data-activates="slide-out" class="button-collapse"><i class="material-icons">menu</i></a>
<a href="http://www.google.com/" target="_blank"><img src="../../../../logo.png"></a>
<label class="title-solv">App</label>
<ul id="nav-mobile" class="right">
<li class="usericon"><i class="large material-icons">perm_identity</i></li>
<li class="username">{{username}}</li>
<li>
<i [routerLink]="['/login']" class="large material-icons">power_settings_newt</i>
</li>
</ul>
</div>
</nav>
</div>
<ul id="slide-out" [ngClass]="{'hide': flag}" class="side-nav fixed own">
<li [ngClass]="{'activated': isValid1 }"><a (click)="m1()" class="whitecolor">Dashboard</a></li>
<li [ngClass]="{'activated': isValid2 }"><a (click)="m2()" class="whitecolor">Dataset Management</a></li>
<li [ngClass]="{'activated': isValid3 }"><a (click)="m3()" class="whitecolor">Forecast</a></li>
<li [ngClass]="{'activated': isValid4 }"><a (click)="m4()" class="whitecolor">Reporting</a></li>
<li [ngClass]="{'activated': isValid5}"><a (click)="m5()" class="whitecolor">Indicator Cloud</a></li>
</ul>
<div class="home">
<div class="webbox">
<router-outlet></router-outlet>
</div>
</div>
<footer class="footerclass">
</footer>
</div>
答案 0 :(得分:1)
居中不适用于文本字段或文本区域。对于文本区域,我们支持它用于显示目的,但是当我们从Java切换到本机编辑时,这是有问题的。
目前没有好的解决方法。