如何在样式input标记占位符扩展该父样式,我希望right direction在left样式输入中.
例如,这是我的输入:
<input type="password" style='direction:ltr;text-align:left;' id="password" placeholder="password">
Run Code Online (Sandbox Code Playgroud)
占位符text-align现在保留.该怎么用direction:rtl?
Tus*_*har 11
我想这可以帮到你.
input[type="text"]:-moz-placeholder {
text-align: right;
}
input[type="text"]:-ms-input-placeholder {
text-align: right;
}
input[type="text"]::-webkit-input-placeholder {
text-align: right;
}
Run Code Online (Sandbox Code Playgroud)