如何在flickity中为缩略图添加标题 [英] How do I add caption to the thumbnail in flickity

查看:99
本文介绍了如何在flickity中为缩略图添加标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I am using flickity to display images from a database.i have managed to get the images in html.i can't add captions to the images.help me to add captions at the bottom of the image. if there is another plugin which can do similar thing please let me know and send the code as well.i need an answer asap





我尝试过:





What I have tried:

<pre><h3 style="text-align: left;margin-bottom: 30px,margin-top: 30px">Home 
 Improvement</h3>
<div class="carousel" data-flickity='{ "groupCells": 
false,"cellAlign":"left","initialIndex": 2,"resize": true,"freeScroll": 
true,"freeScrollFriction": 0.03,"wrapAround": true}'>   
<?php foreach ($homeimprovement as $row ) {   ?>  
<div> <img src="<?php echo base_url().'assets/images/'.$row['ImageUrl']?>" 
class="gallery"/></div> 







这是image的css库类。如果你可以为我编辑css为flickity添加描述我会很高兴








this is the css gallery class for the the image.if you can edit the css for me to add description to the flickity i'll be happy


.gallery {
border: 1px solid #ddd;
border-radius: 5px;
padding: 10px;
width: 300px;
height: 200px;
margin: 10px;
}

推荐答案

homeimprovement as
homeimprovement as


row){?>
< div> < img src =<?php echo base_url()。'assets / images /'.
row ) { ?> <div> <img src="<?php echo base_url().'assets/images/'.


row ['ImageUrl']?>
class =gallery/>< / div>
row['ImageUrl']?>" class="gallery"/></div>







这是image的css库类。如果你可以为我编辑css为flickity添加描述我会很高兴








this is the css gallery class for the the image.if you can edit the css for me to add description to the flickity i'll be happy


.gallery {
border: 1px solid #ddd;
border-radius: 5px;
padding: 10px;
width: 300px;
height: 200px;
margin: 10px;
}


这篇关于如何在flickity中为缩略图添加标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆