gpt4 book ai didi

html - 堆叠 CSS 文件而不是组合它们 - 优点和缺点?

转载 作者:搜寻专家 更新时间:2023-10-31 23:11:35 25 4
gpt4 key购买 nike

如果您查看波士顿环球报的源代码,您会发现一个链接将所有 CSS 一次性串在一起。

<link href="/css/html5reset.css,globe-globals.css,globe-masthead.css,globe-nav.css,globe-nav-menus.css,globe-saved.css,globe-main.css,globe-footer.css,globe-print.css" rel="stylesheet" media="only all">

我第一次见。我的问题

  1. 这是包含 CSS 的好方法吗?
  2. 它是否只进行一次 HTTP 调用? (来源在点击时将它们显示为一个 CSS 文件)。

最佳答案

you'll see that one single link strings together all the CSS in one go

没有。我们看到的是一个带有 URL 的文件,暗示它是通过将一堆文件连接在一起创建的。

Is this a good way of including CSS?

是的。拥有一个 CSS 文件意味着只有一个 HTTP 请求来获取它。

Does it makes just one HTTP call?

是的。

关于html - 堆叠 CSS 文件而不是组合它们 - 优点和缺点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8326663/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com