Reputation: 1
I'm facing a problem about amp-img.
When I write inline elements after amp-img on source code, amp-img swallows the elements inside it when browser renders it.
source code <amp-img /><span>...</span>
->
rendered html <amp-img><span>...</span></amp>
or
source code <amp-img /><amp-img /><a><amp-img /></a>
->
rendered html <amp-img><amp-img><a><amp-img /></a></amp-img></amp-img>
If I flip the order of the elements like this,
source code <span>...</span><amp-img />
It works normally.
I checked with Chrome and Safari on MacOS, Safari on iOS.
Does anybody know the reason?
Thank you.
Upvotes: 0
Views: 74
Reputation: 3934
Change
<amp-img /><span>...</span>
to
<amp-img></amp-img><span>...</span>
Upvotes: 2