为什么文本/按钮跳转页面加载(Chrome)
Why are text/buttons jumping around on page load (Chrome)?
请访问我们的主页http://froy.com。
在页面加载的前半秒内,您可以看到"商店"按钮以及按钮上方的文本出现在屏幕左侧附近。当页面加载完成后,它们会移动到合适的位置。
这个问题似乎只发生在Chrome上。我们的网站是响应。
理想情况下,我们希望网站加载就像http://ae.com。他们在主页文本和按钮上使用了类似的布局,但他们都能正常加载。
我不介意视频最后加载,当视频出现时所有东西都往下移动,但我发现文本/按钮从左到右移动非常不专业。
这些按钮应该不是问题,如果视频没有渲染,它们就在它们应该在的位置。
当它呈现时,它们应该是好的。
我会看看你的视频和视频容器。也许可以尝试将.slideshow-video-container
CSS规则更改为:
.slideshow-video-container {
position: relative;
padding-top: 25px;
overflow: hidden;
}
我建议你用覆盖元素隐藏整个页面,只有在所有内容加载后,才淡出该元素。这应该解决大部分或所有的渲染问题。下面是一个例子:
$(function(){
$('#overlay').fadeOut();
})
div#content{
width:50%;
margin:auto;
p{
margin:2rem;
padding:0;
}
}
div#overlay{
position:fixed;
top:0;left:0;right:0;bottom:0;
background:#fff;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id=content>
<p>Authoritatively build effective networks rather than transparent ideas. Monotonectally pontificate high-quality content whereas world-class schemas. Distinctively leverage other's distributed scenarios vis-a-vis synergistic applications. Proactively implement bricks-and-clicks.</p>
<p>Authoritatively build effective networks rather than transparent ideas. Monotonectally pontificate high-quality content whereas world-class schemas. Distinctively leverage other's distributed scenarios vis-a-vis synergistic applications. Proactively implement bricks-and-clicks.</p>
<p>Authoritatively build effective networks rather than transparent ideas. Monotonectally pontificate high-quality content whereas world-class schemas. Distinctively leverage other's distributed scenarios vis-a-vis synergistic applications. Proactively implement bricks-and-clicks.</p>
<p>Authoritatively build effective networks rather than transparent ideas. Monotonectally pontificate high-quality content whereas world-class schemas. Distinctively leverage other's distributed scenarios vis-a-vis synergistic applications. Proactively implement bricks-and-clicks.</p>
<p>Authoritatively build effective networks rather than transparent ideas. Monotonectally pontificate high-quality content whereas world-class schemas. Distinctively leverage other's distributed scenarios vis-a-vis synergistic applications. Proactively implement bricks-and-clicks.</p>
<p>Authoritatively build effective networks rather than transparent ideas. Monotonectally pontificate high-quality content whereas world-class schemas. Distinctively leverage other's distributed scenarios vis-a-vis synergistic applications. Proactively implement bricks-and-clicks.</p>
<p>Authoritatively build effective networks rather than transparent ideas. Monotonectally pontificate high-quality content whereas world-class schemas. Distinctively leverage other's distributed scenarios vis-a-vis synergistic applications. Proactively implement bricks-and-clicks.</p>
<p>Authoritatively build effective networks rather than transparent ideas. Monotonectally pontificate high-quality content whereas world-class schemas. Distinctively leverage other's distributed scenarios vis-a-vis synergistic applications. Proactively implement bricks-and-clicks.</p>
<p>Authoritatively build effective networks rather than transparent ideas. Monotonectally pontificate high-quality content whereas world-class schemas. Distinctively leverage other's distributed scenarios vis-a-vis synergistic applications. Proactively implement bricks-and-clicks.</p>
<p>Authoritatively build effective networks rather than transparent ideas. Monotonectally pontificate high-quality content whereas world-class schemas. Distinctively leverage other's distributed scenarios vis-a-vis synergistic applications. Proactively implement bricks-and-clicks.</p>
<p>Authoritatively build effective networks rather than transparent ideas. Monotonectally pontificate high-quality content whereas world-class schemas. Distinctively leverage other's distributed scenarios vis-a-vis synergistic applications. Proactively implement bricks-and-clicks.</p>
<p>Authoritatively build effective networks rather than transparent ideas. Monotonectally pontificate high-quality content whereas world-class schemas. Distinctively leverage other's distributed scenarios vis-a-vis synergistic applications. Proactively implement bricks-and-clicks.</p>
</div>
<div id=overlay></div>
相关文章:
- 加载Chrome扩展中的脚本错误
- 页面加载代码上的Javascript使其重新加载chrome扩展
- jQuery dataTables对包装宽度的更改只有在加载chrome's检查员
- 重新加载 Chrome 扩展程序内容脚本执行环境
- 在推特流加载时加载 chrome 扩展脚本
- 如何在使用Javascript加载Chrome时计算图像
- 使用相对路径时无法加载chrome扩展内容脚本
- 正在尝试加载gif图像,但未加载chrome
- 我怎么能运行这个脚本时,标签重新加载(chrome扩展)
- 某些页面中未加载Chrome扩展
- Javascript元素在框架内从外部源加载(Chrome内容脚本)
- 在加载chrome扩展之前隐藏所有元素
- 为什么文本/按钮跳转页面加载(Chrome)
- Iframe src改变与Javascript不加载Chrome
- 重新加载Chrome DevTools扩展侧边栏在页面更改
- 页面重新加载chrome扩展消息发送
- jQuery加载Chrome而不是Firefox,为什么
- 我必须重新加载chrome扩展以显示通知
- 在新标签加载(Chrome)上突出显示URL/综合框文本
- Youtube如何控制Flash内容加载(Chrome 12)