Unicode Bidirectional override fails for Input Placeholders.
Unicode 双向输入占位符失败,下面是带有 html 和 CSS(具有 rtl 实现和 unicode 双向覆盖(的标记和相同的输出。
<!DOCTYPE html>
<html>
<head>
<style>
* {
direction: rtl !important;
unicode-bidi: bidi-override !important;
}
</style>
</head>
<body>
<h1>The unicode-bidi Property</h1>
<div>Some text. Default writing direction.</div>
<div class="ex1">Some text. Right-to-left direction.</div>
<input placeholder="abc def"/>
</body>
</html>
占位符双向失败的输出
https://www.w3schools.com/code/tryit.asp?filename=G37SI0TRBPPM
您需要添加占位符 css:
这是更新的小提琴:
* {
direction: rtl;
unicode-bidi: bidi-override;
}
input[type="text"]:-moz-placeholder {
unicode-bidi: bidi-override;
}
input[type="text"]:-ms-input-placeholder {
unicode-bidi: bidi-override;
}
input[type="text"]::-webkit-input-placeholder {
unicode-bidi: bidi-override;
}
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div class="ex1">Some text. Right-to-left direction.</div>
<input type="text" placeholder="abc def" />
</body>
</html>