首页
极刻
圈子
教程
开源
登录 / 注册
返回教程:CSS 参考手册
TRY RUN / 在线示例
CSS 参考手册 尝试一下
CSS 参考手册 尝试一下
源代码
运行
<!DOCTYPE html> <html> <head> <style> #myDIV { margin:auto; width:400px; height:200px; background-color:lightblue; border:1px solid black; direction:rtl; } </style> </head> <body> <p>点击“尝试一下”按钮,设置 DIV 元素的 unicode-bidi 属性:</p> <button onclick="myFunction()">尝试一下</button> <div id="myDIV">这是我的 DIV 元素。</div> <script> function myFunction() { document.getElementById("myDIV").style.unicodeBidi = "bidi-override"; } </script> </body> </html>
运行结果