Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS部分第18题与第19题,关于display:none与visibility:hidden下img是否加载的问题 #9

Open
DanielXH opened this issue Jul 24, 2017 · 1 comment

Comments

@DanielXH
Copy link

题目中认为:
如果img设置了display:none,在页面载入时,图片会被下载;
如果img设置了visibility:hidden,在页面载入时,图片不会被下载。

而实际经过测试,无论设置什么属性,图片都是会被加载的。

@zzugbb
Copy link

zzugbb commented Nov 23, 2018

  1. 注意19题,原题中父元素设置了display:none。
  2. 元素有 display:none,标签上的图标会被加载
  3. 父元素有 display:none,子元素图片不会被加载.

参考:关于display:none;的图片加载

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants