是CSS样式表异步加载 [英] Are CSS Stylesheets loaded Asynchronously

查看:153
本文介绍了是CSS样式表异步加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在通过标签加载样式表,是在样式表同步或异步加载?我有两个样式设计:mura.css和typography.css。它们被加载在页面的区域和仅有mura.css之前typography.css被加载。出于某种原因,虽然mura.css属性都出现在Chrome Webtools的与typography.css被覆盖。

When loading stylesheets via the tag, are the stylesheets loaded asynchronously or synchronously? I have a design with two stylesheets: mura.css and typography.css. They are loaded in the area of the page and typography.css is loaded just before mura.css. For some reason though mura.css attributes are showing in the Chrome Webtools as being overwritten with typography.css.

推荐答案

CSS文件中加载它们被包含在文件中的顺序。

CSS files are loaded in the order they are included in the file.

如果从第一个CSS文件东西覆盖在第二个CSS文件的东西,这很可能是由于你的选择不正确使用。仔细检查您的选择对于那些不正确地结合风格的页面元素。

If something from the first CSS file is overwriting something in the second CSS file, it is most likely due to your selectors being used incorrectly. Double-check your selectors for the elements of the page that are incorporating the style incorrectly.

这篇关于是CSS样式表异步加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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