这是网站的链接 http://lotussystems.in/
当我在 Chrome(移动)中打开它时,它工作得很好,但是当我在 safari(移动)上打开它时,会有右边距或那里的内容,并且还会出现 x 轴滚动,而我提到溢出-x 是隐藏的。如果我隐藏 overflow-x 则它不起作用。
谁能帮帮我。
最佳答案
当我在 Chrome 中的网页上模拟手机浏览器时,我发现问题出在标记的这一行中:
<div class="call-icon">
<h5 class="text-center" id="#callbox">
Talk to us
</h5>
</div>
...还有这一行:
<div class="popup-header">
<span class="popup-title">CONTACT
<div class="popup-image"></div>
</span>
</div>
...还有这一行:
<a href="#" class="ti_scroll bounceInRight animated" style="display: block;">
<i class="fa fa-angle-up"></i>
</a>
所有这些元素都溢出到右边距,因此您需要更改它们的 right-margin
CSS 样式,使它们的脚不在右边距中。它在 Chrome 移动版中呈现良好,但在 Safari 移动版中呈现效果不佳,因为这两种浏览器呈现的边距略有不同。参见 this post关于如何使用 Javascript 检测 Safari 以更改特定浏览器的样式。
旁注:
将来,在不发布静态代码的情况下将您的网站链接到 StackOverflow 被认为是不合适的 Asking Etiquette :
If it is possible to create a live example of the problem that you can link to (for example, on http://sqlfiddle.com/ or http://jsbin.com/) then do so - but also include the code in your question itself. Not everyone can access external sites, and the links may break over time.
关于javascript - 仅限 Safari 浏览器中的右边距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48827770/