gpt4 book ai didi

html - 如何正确预加载 SVG 图像?

转载 作者:行者123 更新时间:2023-12-04 11:47:20 27 4
gpt4 key购买 nike

我正在尝试 preload我的博客上有一个 SVG 标志,但 Chrome 一直给我一堆警告,我似乎无法修复它们。

标志:https://keestalkstech.com/wp-content/uploads/2019/05/ktt-logo.svg
预加载链接:<link rel="preload" href="https://keestalkstech.com/wp-content/uploads/2019/05/ktt-logo.svg" as="image" type="image/svg+xml" crossorigin="anonymous" />
我在 Chrome 中收到以下警告:

A preload for 'https://keestalkstech.com/wp-content/uploads/2019/05/ktt-logo.svg' is found, but is not used because the request credentials mode does not match. Consider taking a look at crossorigin attribute.



和:

The resource https://keestalkstech.com/wp-content/uploads/2019/05/ktt-logo.svg was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally.



任何指针?

最佳答案

看起来像删除 crossorigin属性修复它:

<link rel="preload" 
href="https://keestalkstech.com/wp-content/uploads/2019/05/ktt-logo.svg"
as="image"
type="image/svg+xml" />

关于html - 如何正确预加载 SVG 图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62377727/

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