gpt4 book ai didi

html - 由于 Addthis 脚本导致的页面宽度错误

转载 作者:太空宇宙 更新时间:2023-11-04 15:19:25 25 4
gpt4 key购买 nike

由于 AddThis 代码,具有 AddThis 代码的页面非常宽。结果,出现了一个水平滚动条。

删除代码,或将页面方向更改为 LTR 修复所有问题,页面宽度恢复正常。

如前所述,出现问题是因为我使用的是 RTL 方向 (html dir="rtl"),当我尝试将 Addthis 代码放入方向为 LTR 的 div 时,它没有帮助。

我怎样才能摆脱水平滚动条并使用 RTL 方向?

最佳答案

AddThis html 中有一些自动添加到页面的 span。其中一些跨度使用“.at_a11y”css 类,其中有一个 left 属性,这是水平滚动的主要原因。

.at_a11y {
position: absolute!important;
left: -10000px!important;
top: auto!important;
width: 1px!important;
height: 1px!important;
overflow: hidden!important;
}

解决方案:您可以在自己的 css 文件中定义自己的 '.at_a11y' css 类,并将 left 属性覆盖为正常值(value)。这样就会导致上面的css属性失效,然后水平滚动条就消失了!

.at_a11y
{
left: auto !important;
}

关于html - 由于 Addthis 脚本导致的页面宽度错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10968468/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com