AMP图像未出现

thu*_*ief 4 html css amp-html

我无法amp-img显示这个。它用作图像,当我单击src-link时,它会正确加载到单独的页面上。将其更改为amp-img使其消失。我background-color: red在上设置amp-img,该框正确显示,但是它是一个空的红色框。

HTML:

<li>
    <a href="/">
    <amp-img src="https://d12v9rtnomnebu.cloudfront.net/oursite/logo_white.png" alt="site logo" width="264" height="96"/>
    </a>
</li>
Run Code Online (Sandbox Code Playgroud)

CSS(可能有很多多余的东西需要修剪,但在工作之前不知道什么是重要的):

.amp .site-menu li {
    height: 32px;
    line-height: 32px;
}

.amp .site-menu li:first-child {
    float: left;
    min-width: 50px;
    max-width: 180px;
    width: 100%;
    display: block;
}

.amp .site-menu a {
    min-width: 50px;
    max-width: 200px;
    width: 100%;
    display: block;
}

.amp .site-menu amp-img {
    height: 32px;
    min-width: 50px;
    max-width: 200px;
    width: 100%;
    float: left;
    display: block;
    background-color: red;
}
Run Code Online (Sandbox Code Playgroud)

thu*_*ief 6

我已经省略了文档中列出的head标签。包括修复它。 <script async src="https://cdn.ampproject.org/v0.js"></script>