typescript 单击时以全屏方式打开图像的Angular

lnlaulya  于 2022-12-05  发布在  TypeScript
关注(0)|答案(1)|浏览(139)

我创建了gallery组件,我想在点击时全屏打开图像。我认为只需为gallery.component.ts中的3个图像创建3个函数
下面是我在gallery.component.html中编写的代码:

<div class="col-lg-4 col-md-4 col-xs-4 thumb mb-4">
    <a class="thumbnail" href="#">
        <img class="img-responsive rounded" src="../../assets/images/small/01.Gg1ZD.jpg" alt="">
    </a>
</div>

<div class="col-lg-4 col-md-4 col-xs-4 thumb mb-4">
    <a class="thumbnail" href="#">
        <img class="img-responsive rounded" src="../../assets/images/small/02.wWNQN.jpg" alt="">
    </a>
</div>

<div class="col-lg-4 col-md-4 col-xs-4 thumb mb-4">
    <a class="thumbnail" href="#">
        <img class="img-responsive rounded" src="../../assets/images/small/03.ZFJbM.jpg" alt="">
    </a>
</div>

没有图书馆也能做到吗?

相关问题