如何解决我的图片库中的这个问题? [英] How can get around this issue in my image gallery?
本文介绍了如何解决我的图片库中的这个问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我对我的图片库中的图片使用HTML的方法:
This is how I have my HTML for the images in my gallery:
<p class="crop">
<img src="image1.jpg" alt="image1.jpg" /></p>
<p class="crop">
<img src="image2.jpg" alt="image2.jpg" /></p>
但是,使用这样的p类使得它们是单独的图像而不是一组图像, /以前的箭头不工作。
However, using p classes like this makes them separate images instead of a group of images and therefore my next/previous arrows don't work.
我需要使它们成为一组图像,所以图库中的箭头可以正常工作,但我想保持p类,因为我需要它裁剪图片。
I need to make them a group of images so the arrows in the gallery can work again properly, but I want to keep the p class as I need it to crop the images. How can I get around this?
推荐答案
将裁剪逻辑移到img标签
Move the crop logic to the img tag
<img class="crop" src="image1.jpg" alt="image1.jpg" />
<img class="crop" src="image2.jpg" alt="image2.jpg" />
这篇关于如何解决我的图片库中的这个问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文