springboot怎么把数据传给前端:springboot 如何引入前端 bootstrap?
这种问题网上一搜一大堆,你可以具体找一篇文章试试,遇到问题可以针对相关问题去提问。springboot通过jar包方式引入bootstrap_个人文章 - SegmentFault 思否 这不是查查就
顺晟科技
2022-10-18 12:34:17
89
我有一个可滚动图像列表(示例),我试图找出哪个是屏幕上显示的当前图像。
我们的想法是聚焦当前图像的缩略图。下面是我的代码(我使用的是Smarty TE):
{if $images}
<div class="galleryHolder left">
<div class="thumbsHolder left">
<div class="pos-sticky">
{section name=i loop=$images}
<a href="/files/{$images[i].file}" data-fancybox="gallery" class="thumb">
<picture>
<source srcset="/files/webp/tntn/{$images[i].file_webp} 1x" type="image/webp">
<source srcset="/files/tntn/{$images[i].file} 1x" type="image/jpeg">
<img class="thumbImg" src="/files/tntn/{$images[i].file}" alt="{if $images[i].name}{$images[i].name}{else}{$row.name}{/if}">
</picture>
</a>
{/section}
</div>
</div>
<div class="imagesHolder right">
{section name=i loop=$images}
<a href="/files/{$images[i].file}" data-fancybox="gallery" class="full">
<picture>
<source srcset="/files/webp/{$images[i].file_webp} 1x" type="image/webp">
<source srcset="/files/{$images[i].file} 1x" type="image/jpeg">
<img class="fullImg" src="/files/{$images[i].file}" alt="{if $images[i].name}{$images[i].name}{else}{$row.name}{/if}">
</picture>
</a>
{/section}
</div>
</div>
{/if}
顺晟科技:
如果你在每个图像上放置一个IntersectionObserver,那么当它进入和离开视口时,你会收到通知。
在回调函数中,您可以在缩略图上设置一个类,分别突出显示或不突出显示它。
如果您需要有关代码的更多帮助,请告诉我。
05
2022-12
02
2022-12
02
2022-12
29
2022-11
29
2022-11
24
2022-11