我目前正在构建一个网站,除了几张图片外,其他所有图片都可以正常加载(其他图片加载没有任何问题)。我已经看到图像自动获得 CSS 属性“display: none !important”。
这个问题只发生在 Safari 中(Chrome 可以很好地加载图片!)
HTML:
<div id="socialLinks">
<img src="img/social/white/linkedin.png" alt="linkedin">
<img src="img/social/white/facebook.png" alt="facebook">
<img src="img/social/white/google.png" alt="google">
<img src="img/social/white/email.png" alt="email">
</div>
CSS:
#socialLinks
{
position: fixed;
margin-top: -4%;
float: right;
top: 7%;
left: 88vw;
}
我已经尝试了我能想到的一切。 Safari 会找到图像路径,有时会显示 alt 属性。
提前致谢!
最佳答案
广告拦截器的工作方式多种多样,通常会尝试隐藏社交链接/号召性用语。
按顺序并一起尝试这些步骤,看看您必须做什么才能让图像通过您的广告 block :
- 将
#socialLinks
的 ID 更改为其他内容 - 更改图像的
src
以不从名为social
的文件夹提供服务 - 将每个图像的名称更改为不同的名称,即:
icon1.png
- 将替代文本更改为没有社交媒体网站名称的内容
- 放弃。是您链接的
href
导致它们被阻止
Font Awesome 自己也遇到过这个问题:
"Apparently, Adblock Plus can remove Font Awesome brand icons with their "Remove Social Media Buttons" setting. We will not use hacks to force them to display. Please report an issue with Adblock Plus if you believe this to be an error. To work around this, you'll need to modify the social icon class names." from http://fontawesome.io/icons/
关于html - Safari 自动 "display: none !important"不会加载图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34301807/