花了整整一天的时间试图解决这个问题,希望有人可以帮助我!我是新来的,所以如果这是一个重复的问题,我道歉(我做了我的研究,没有事先找到任何东西)。
我正在为我的咨询公司构建的网站使用浏览器缓存,但如果清除缓存,则不会在我的背景/滑块图像中正确加载CSS。浏览器(Chrome和& Edge)不是正确执行CSS,而是将它们堆叠在一起,同时将身体其他部分向下推进。
我确实使用服务器解析来处理某些导航脚本等。出于某种原因,CSS不会在刷新或硬刷新时加载,但如果单击index.html链接则会加载(在徽标,导航栏上)等)。
无需隐藏,因此您可以在http://www.okanaganmarketing.com
查看该网站下面是网站的滑块代码:
<div class="slider">
<div class="fullwidthbanner-container">
<div class="fullwidthbanner">
<ul>
<li class="first-slide" data-transition="fade" data-slotamount="10" data-masterspeed="300">
<img src="assets/images/snap_dot.jpg" data-fullwidthcentering="on" alt="slide">
<div class="tp-caption first-line lft tp-resizeme start" data-x="center" data-hoffset="0" data-y="250" data-speed="1000" data-start="200" data-easing="Power4.easeOut" data-splitin="none" data-splitout="none" data-elementdelay="0" data-endelementdelay="0">Grow Your Business</div>
<div class="tp-caption second-line lfb tp-resizeme start" data-x="center" data-hoffset="0" data-y="340" data-speed="1000" data-start="800" data-easing="Power4.easeOut" data-splitin="none" data-splitout="none" data-elementdelay="0" data-endelementdelay="0">We Specialize In Marketing Strategy & Implementation</div>
<div class="tp-caption slider-btn sfb tp-resizeme start" data-x="center" data-hoffset="0" data-y="510" data-speed="1000" data-start="2200" data-easing="Power4.easeOut" data-splitin="none" data-splitout="none" data-elementdelay="0" data-endelementdelay="0"><a href="#" class="btn btn-slider">We'll Show You How</a></div>
</li>
<li class="first-slide" data-transition="fade" data-slotamount="10" data-masterspeed="300">
<img src="assets/images/millenials_2_dot_grey.jpg" data-fullwidthcentering="on" alt="slide">
<div class="tp-caption first-line lft tp-resizeme start" data-x="center" data-hoffset="0" data-y="250" data-speed="1000" data-start="200" data-easing="Power4.easeOut" data-splitin="none" data-splitout="none" data-elementdelay="0" data-endelementdelay="0">Engage Your Customers</div>
<div class="tp-caption second-line lfb tp-resizeme start" data-x="center" data-hoffset="0" data-y="340" data-speed="1000" data-start="800" data-easing="Power4.easeOut" data-splitin="none" data-splitout="none" data-elementdelay="0" data-endelementdelay="0">Social Media Marketing & Account Managment</div>
<div class="tp-caption slider-btn sfb tp-resizeme start" data-x="center" data-hoffset="0" data-y="510" data-speed="1000" data-start="2200" data-easing="Power4.easeOut" data-splitin="none" data-splitout="none" data-elementdelay="0" data-endelementdelay="0"><a href="#" class=" second-btn btn btn-slider">We'll Take Care Of It For You</a></div>
</li>
<li class="first-slide" data-transition="fade" data-slotamount="10" data-masterspeed="300">
<img src="assets/images/sunset.jpg" data-fullwidthcentering="on" alt="slide">
<div class="tp-caption first-line lft tp-resizeme start" data-x="center" data-hoffset="0" data-y="250" data-speed="1000" data-start="200" data-easing="Power4.easeOut" data-splitin="none" data-splitout="none" data-elementdelay="0" data-endelementdelay="0">Reach The Right Customers</div>
<div class="tp-caption second-line lfb tp-resizeme start" data-x="center" data-hoffset="0" data-y="340" data-speed="1000" data-start="800" data-easing="Power4.easeOut" data-splitin="none" data-splitout="none" data-elementdelay="0" data-endelementdelay="0">Marketing Communications & Media Exposure For Your Business</div>
<div class="tp-caption slider-btn sfb tp-resizeme start" data-x="center" data-hoffset="0" data-y="510" data-speed="1000" data-start="2200" data-easing="Power4.easeOut" data-splitin="none" data-splitout="none" data-elementdelay="0" data-endelementdelay="0"><a href="#" class="btn btn-slider">We'll Help You Reach Your Goals</a></div>
</li>
</ul>
</div>
</div>
</div>
如果有人可以帮助我,我将会非常感激,因为我的想法已经用完了!在此先感谢您的帮助!!
答案 0 :(得分:0)
对于遇到同样问题的人,希望这对你有所帮助。我设法弄清楚了自己,并不完全确定哪个部分最终解决了问题,但现在它已经修复了。
我正在使用服务器解析.shtml文档,将我的脚本包含在我的页脚中(所以我没有必要在我的网站上编辑它们)并注意到当我单独查看我的javascript和JQuery脚本时使用ASYNC属性运行它们,由于某种原因,在解析文件中似乎导致了问题。一旦我从滑块相关的JQuery文件中删除了ASYNC属性,它就像一个按钮一样顺利运行!
如果有人遇到这个问题,希望这会有所帮助!