【发布时间】:2019-11-11 13:04:53
【问题描述】:
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="image-scale.js"></script>
<div class="col-md-9">
<div class="gallery-lsit">
<?php foreach ($gallery_imgs as $img):?>
<figure class="col-md-4">
<a class="img-popup pan" data-fancybox="gallery" href="<?php echo base_url();?><?php echo $img->image_url; ?>">
<img class="scale" data-scale="fill" src="<?php echo base_url(); echo $img->thumbnail_url; ?>" class="img-fluid">
</a>
<h3 class="text-center my-3"><?php echo $img->title; ?></h3>
</figure>
<?php endforeach;?>
</div>
</div>
<script>
$(function() {
$("img.scale").imageScale();
});
</script>
根据上面的代码,我在页面中插入了所有必需的文件,但它不起作用 在下图中,您可以看到页面上图像的当前位置。 我想显示相同大小的图像。
【问题讨论】:
标签: php jquery html codeigniter scale