How to Change CSS direction property of the input field automaticly if the user can use an language rtl or ltr

前端 未结 5 903
失恋的感觉
失恋的感觉 2021-02-06 08:49

Example: if I use arabic language the text field direction will be rtl and if I want to write a new text and I switch to the English language the direction inside the text field

5条回答
  •  迷失自我
    2021-02-06 09:01

    body{direction: rtl;}
    *[dir="ltr"] { direction: ltr; unicode-bidi: embed; }
    *[dir="rtl"] { direction: rtl; unicode-bidi: embed; }
    bdo[dir="ltr"] { direction: ltr; unicode-bidi: bidi-override; }
    bdo[dir="rtl"] { direction: rtl; unicode-bidi: bidi-override; }
    

提交回复
热议问题