开发者

Wordpress - strange loading problem

开发者 https://www.devze.com 2023-02-28 01:55 出处:网络
I am currently using a modified version of this theme to display an annual report: http://www.elegantthemes.com/preview/ElegantEstate/

I am currently using a modified version of this theme to display an annual report:

http://www.elegantthemes.com/preview/ElegantEstate/

I can't link the report as our project manager wants to keep the site private until launch.

The project manager is complaining of a 开发者_运维知识库strange loading pattern where some content in the features slider shows up before the first slide for a few seconds, until the page is completely loaded. I do not have this problem myself.

Could anyone explain why this might be happening, and how I could fix it? Could I install a plugin that would pre-load the entire page or something like that?

I tried an image pre-loader plugin that did not solve the problem.

Thanks for your help.


Many sliders employ a technique where all of the content is loaded in the html, something like:

<div id="slider">
  <div class="pane">
    content
  </div>
  <div class="pane">
    content
  </div>
  <div class="pane">
    content
  </div>
</div>

While the height and width of the combination of all three individual pane heights and widths, it will be larger than your slider wrapper div. For those who do not use JS, this is what they will see. This is considered to be graceful degradation, whereby they will not get the fancy slider, but they still will be able to see the content.

Once the JS loads in the page, the slider script most likely applies CSS rules that limit the size of the viewable slider area. The slider will likely get height and width parameters and an overflow declaration, something like:

width:200px;
height:200px;
overflow:hidden;

Once those rules take effect, the slider will look as it should. Until that happens, your slider will look nothing like a slider and all of the content will be viewable in a very ugly fashion.

The reason why your project manager is seeing it differently than you may be due to different connection speeds or individual browser inconsistencies. It sounds to me like your slider is working, you just want it to do something that it's not meant to do.

I think you might be able to hack this to work the way you want by adding rules similar to the ones I showed above to the containing div in your CSS style sheet.

I know you cannot post the url here, but if you can post or link to some JS, HTML, and/or CSS for the slider (or even the slider script used in this project), we might be of more help.

0

精彩评论

暂无评论...
验证码 换一张
取 消