我正在使用Justified Gallery,我想将我的页面作为即时文章发布到 Facebook 上。当我浏览这里的文档时,我发现我可以通过Transformer Rules将图像转换为幻灯片。这是我的画廊代码:
<div class="myExMul">
<a href="link_to_img" class="swipeboxImg">
<img src="link_to_img" alt="example_text" class="myExMulImg">
</a>
<a href="link_to_img2" class="swipeboxImg">
<img src="link_to_img2" alt="example_text2" class="myExMulImg">
</a>
<a href="link_to_img3" class="swipeboxImg">
<img src="link_to_img3" alt="example_text3" class="myExMulImg">
</a>
</div>
这是我的变压器规则:
{
"class": "SlideshowRule",
"selector": "div.myExMul",
},
{
"class": "SlideshowImageRule",
"selector": "img.myExMulImg",
"properties": {
"image.url": {
"type": "string",
"selector": "img.myExMulImg",
"attribute": "src"
},
"caption.title": {
"type": "string",
"selector": "img.myExMulImg",
"attribute": "alt"
}
}
}
当我导入规则时,似乎我的规则破坏了一切,我不能再发表我的文章,我在这里做错了什么?