我使用http://nanogallery2.nanostudio.org/index.html解析库,但不起作用。我需要帮助!
我的代码:
<div data-nanogallery2='{
"itemsBaseURL": "http://nanogallery2.nanostudio.org/samples/",
"thumbnailWidth": "auto",
"thumbnailHeight": "auto",
"thumbnailDisplayInterval": 30,
"thumbnailLabel": {
"display": false
},
"displayBreadcrumb": false,
"breadcrumbAutoHideTopLevel": false,
"breadcrumbOnlyCurrentLevel": false,
"thumbnailOpenImage": false
}'>
<?php foreach($arr_img as $img) { ?>
<a href="#" data-ngthumb="<?php echo $img; ?>"></a>
<?php } ?>
</div>它显示了,但所有回波$img都在一行中,如下所示:

帮帮我,怎么修理,谢谢!
发布于 2017-08-28 07:51:07
您选择的框架适用于自我托管的图像。您尝试使用外部flickr链接,这里的语法有一点不同。
<div data-nanogallery2='{
"userID": "149035168@N08", //User-Id
"kind": "flickr", //Content type, google images is also supported
"photoset": "72157675715292251", //The set of photos you want
"thumbnailWidth": "200",
"thumbnailDisplayInterval": 30
}'>最好的方法是阅读官方文档以实现图片:flickr
如果您只想要特定的图像,可以通过使用whiteList属性来做到这一点。
https://stackoverflow.com/questions/45913906
复制相似问题