Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 dir 属性设置为 auto 的 div。
我想使用javascript获取渲染方向
当我尝试 div.dir 时,我得到了“自动”值。有没有办法确定 div 是呈现为 rtl 还是 ltr?
谢谢。
var renderedDirection = window.getComputedStyle(theDiv, null).direction;