浏览器出于未知原因从img剥离src属性

时间:2018-07-26 23:16:19

标签: html attributes

对于为什么在网页源代码中的标签会具有“ src”属性,但是在检查器和呈现的页面中,“ src”属性及其源URL被删除,谁能提供任何见解?我复制并粘贴了原始输出并将其粘贴到页面中,并且可以正常工作,并且禁用了js,以防出现问题。

<img alt="Facebook" title="Share on Facebook" class="synved-share-image synved-social-image synved-social-image-share" width="24" height="24" style="display: inline; width:24px;height:24px; margin: 0; padding: 0;border: none; box-shadow: none;" src="http://www.site.devv/wp-content/themes/site/assets/images/SocialIcons/ShareIcons/24x24/facebook.png"/>

检查器/渲染页面

<img alt="Facebook" title="Share on Facebook" class="synved-share-image synved-social-image synved-social-image-share" width="24" height="24" style="display: inline; width:24px;height:24px; margin: 0; padding: 0; border: none; box-shadow: none;">

提前感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

我找到了答案。事实证明,社交共享插件正在创建具有视网膜图标的重复元素集,并且它正在48x48的其他文件夹中查找图标(该文件夹不存在,因此没有src)并隐藏24x24的图标。 / p>