在这种情况下,网页是否会在Chrome或Safari中加载外部样式表? [英] In which case webpage loads without external stylesheet in chrome or safari?

查看:91
本文介绍了在这种情况下,网页是否会在Chrome或Safari中加载外部样式表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这种情况下,网页在Chrome或Safari中没有外部样式表加载?

In which case webpage loads without external stylesheet in chrome or safari ?

我说的是webbrowser首先加载没有样式表的网页,然后重新绘制

I am talking about a case in which webbrowser first loads webpage without stylesheet and then redraw it with css once it becomes available.

这将是巨大的如果你给我一个小的html页面外部样式表,总是加载网页没有外部样式表。

It would be great If you give me a small html page with external stylesheet, which always loads webpage without external stylesheet.

我是一个webkit开发人员,想要在webkit引擎中做一些开发。

I am a webkit developer and want that case to do some development in webkit engine.

推荐答案

p>我相信这是总是的情况。换句话说,CSS文件总是以异步方式加载,当它们可用时,它们存储在broser中并应用到现有的DOM。

I believe that this is always the case. In other words, CSS files are always loaded asynchronously, and when they become available they are stored in the broser and applied to the existing DOM.

如果你对slow加载文件,您可以模拟此并查看您的浏览器的行为。最佳方式如下:获取自己的php和apache安装(例如XAMPP),指示Apache将.css文件作为php文件处理(即在css文件中执行php代码),创建一个新的css文件并在其中添加< ?睡眠(20); 。这将导致css文件被延迟20秒,有效地模拟慢加载。

If you are interested in slow loading files, you can simulate this and see how your browser behaves. Best way is the following: get yourself a php and apache installation (say XAMPP), instruct Apache to handle .css files as php files (i.e. execute php code in css files), create a new css file and at its to add <? sleep(20); ?>. This will cause the css file to be delayed by 20 seconds, effectively simulating the slowloading.

除此之外,您还可以希望在页面加载之后加载CSS文件已加载。您可以在这里找到一个示例: http://www.cssnewbie.com/simple-jquery -stylesheet-switcher /

Other than that, you could also wish to load a CSS file after the page is already loaded. Here you can find an example: http://www.cssnewbie.com/simple-jquery-stylesheet-switcher/

这篇关于在这种情况下,网页是否会在Chrome或Safari中加载外部样式表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆