【发布时间】:2018-05-11 09:56:10
【问题描述】:
您会在我的博文中注意到:http://www.profitanywhereblog.com/twitter-following/ 我在博文顶部有一张右对齐的图片。我想隐藏该图像,但仅限于我网站的 amp 版本。
我读到here 说任何放大器自定义都应该包含在这样的样式标签中:
<style amp-custom>
img.alpha {
display: none;
}
</style>
(我给了我想隐藏类“alpha”的图像,因为我知道我的其他网站图像都没有这个类)。
我使用这个插件把这段代码放在网站的头部:https://wordpress.org/plugins/header-and-footer-scripts-inserter/
它使我的图像在非 amp 版本中消失,但图像仍保留在我网站的 amp 版本中。
由于我是博主,而不是编码员,因此我将不胜感激。
【问题讨论】:
-
顺便说一句,我已经从我的网站头部删除了该代码。
标签: html css wordpress amp-html