I'm trying to customize my tumblr video thumbnails so I can target a specific image to every video post.
The HTML the code is:
{block:Video}
<div class="media-embed">
{block:IndexPage}
<script class="template-replace" type="text/template">
{VideoEmbed-700}
</script>
<div class="video-thumbnail template-remove"{block:VideoThumbnail} style="background-image:url({VideoThumbnailURL});"{/block:VideoThumbnail}></div>
{/block:IndexPage}
{block:PermalinkPage}
{VideoEmbed-700}
{/block:PermalinkPage}
{block:IndexPage}
<div class="video button-overlay {select:Button colors} template-remove"></div>
{/block:IndexPage}
</div>
{block:Caption}
<div class="caption">
{Caption}
{block:More}{block:IfReadMoreText}<p class="read-more-text"><a href="{Permalink}">{text:Read More Text}</a></p>{/block:IfReadMoreText}{/block:More}
</div>
{/block:Caption}
{/block:Video}
I think I should replace the style="background-image:url({VideoThumbnailURL})
but I can't figure out what code I should replace it with.
Any thoughts?
Thanks!
B
答案 0 :(得分:0)
Try this:
{block:VideoThumbnail}
{VideoThumbnailURL}
{/block:VideoThumbnail}
答案 1 :(得分:0)
我建议您查看 {TagsAsClasses} 变量。
<div class="video-thumbnail template-remove {TagsAsClasses}"{block:VideoThumbnail} style="background-image:url({VideoThumbnailURL});"{/block:VideoThumbnail}></div>
您可以使用唯一标记标记每个视频帖子,然后使用css设置样式。
.thumbnailtest {
/* add your styles here */
}