gpt4 book ai didi

css - 使用@import 时的子资源完整性

转载 作者:行者123 更新时间:2023-11-28 08:50:12 25 4
gpt4 key购买 nike

使用@import 时包含子资源完整性的语法是什么?

@import url(//use.fontawesome.com/releases/v5.3.1/css/all.css);

基本上,当像上面那样使用 @import 时,我该如何包含子资源完整性和跨域参数?

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">

最佳答案

TL;DR:SRI 是浏览器的东西,CSS at 规则(如@import)是 css 的东西。

What is the syntax to include subresource integrity when using @import?

据我所知,当前的 CSS 规范(撰写本文时起草的 CSS3)中没有任何内容 - 定义了 @import 的用法 - 详细说明了 SRI 在 css 中的用法。

Besically how do I include the subresource integrity and crossorigin parameters when using @import like above?

这些参数定义了浏览器如何获取资源并解释其合法性。这发生在资源实现(js、css 等)之前。


外部资源:

关于css - 使用@import 时的子资源完整性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52300118/

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