Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amp html 图像中的AMP-SCRIPT lightbox不工作_Amp Html - Fatal编程技术网

Amp html 图像中的AMP-SCRIPT lightbox不工作

Amp html 图像中的AMP-SCRIPT lightbox不工作,amp-html,Amp Html,通过amp脚本插入的图像不适用于amp lightbox gallery 工作演示: 你好,AMPs { “@context”:”http://schema.org", “@type”:“新闻文章”, “标题”:“发布内容的开源框架”, “发布日期”:“2015-10-07T12:02:41Z”, “图像”:[ “logo.jpg” ] } 身体{ -webkit动画:-amp开始8s步骤(1,结束)0s 1正常两个步骤; -moz动画:-amp开始8s步骤(1,结束)0s 1正常两个步骤;

通过amp脚本插入的图像不适用于amp lightbox gallery

工作演示:


你好,AMPs
{
“@context”:”http://schema.org",
“@type”:“新闻文章”,
“标题”:“发布内容的开源框架”,
“发布日期”:“2015-10-07T12:02:41Z”,
“图像”:[
“logo.jpg”
]
}
身体{
-webkit动画:-amp开始8s步骤(1,结束)0s 1正常两个步骤;
-moz动画:-amp开始8s步骤(1,结束)0s 1正常两个步骤;
-ms动画:-amp开始8s步骤(1,结束)0s 1正常两个步骤;
动画:-amp开始8s步骤(1,结束)0s 1正常两者
}
@-webkit关键帧-amp开始{
从{
可见性:隐藏
}
到{
可见性:可见
}
}
@-moz关键帧-amp开始{
从{
可见性:隐藏
}
到{
可见性:可见
}
}
@-ms关键帧-amp开始{
从{
可见性:隐藏
}
到{
可见性:可见
}
}
@-o关键帧-amp开始{
从{
可见性:隐藏
}
到{
可见性:可见
}
}
@关键帧-amp开始{
从{
可见性:隐藏
}
到{
可见性:可见
}
}
身体{
-webkit动画:无;
-moz动画:无;
-ms动画:无;
动画:无
}
欢迎来到AMP网站
脚本集合
const fetchNewImages=async()=>{
const containerImage=document.getElementById(“newImage”);
const id=containerImage.getAttribute(“数据id”);
const response=等待获取(
"https://amp.dev/documentation/examples/api/slow-json-with-items/"
);
const data=wait response.json();
const url=data.items[id].img;
containerImage.innerHTML=`;
};
fetchNewImages();
正常采集
github上的答案:github上的答案: