Edit This Code:
See Result »
<!DOCTYPE html> <html> <head> <style> #myDIV { margin: auto; width: 400px; height: 200px; background-color: lightblue; border: 1px solid black; direction: rtl; } </style> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "//hm.baidu.com/hm.js?73c27e26f610eb3c9f3feb0c75b03925"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> </head> <body> <p>Click the "Try it" button to set the unicode-bidi property of the DIV element:</p> <button onclick="myFunction()">Try it</button> <div id="myDIV">This is my DIV element.</div> <script> function myFunction() { document.getElementById("myDIV").style.unicodeBidi = "bidi-override"; } </script> </body> </html>
Result: