gpt4 book ai didi

html - Css 显示无

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

如果我有一个包含一些重载内容的 div,比如一些大图片。如果在我的样式表中将此 div 设置为不显示,我的网站是否会加载该 div 的内容,或者是否会忽略和不加载该 div 及其内容?

最佳答案

根据 Request Quest :

Browsers download imagery regardless of parent styles

对于看不懂图片的人
<div style="display: none"><img src="img.png"></div>

Does the above trigger a request for img.png in any of the following:

Chrome, Safari, Firefox, IE

Correct! The request was made in Chrome, Safari, Firefox & IE.

Aha! Yes, browsers download imagery regardless of style, as per the spec.

This behaviour has been the downfall of many JavaScript implementations of adaptive imagery, as the original image gets requested before JavaScript can jump in and alter the src property.

关于html - Css 显示无,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17093324/

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