gpt4 book ai didi

javascript - 带有 html css bootstrap 的小元素(灯箱)

转载 作者:行者123 更新时间:2023-11-28 06:43:14 25 4
gpt4 key购买 nike

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="js/bootstrap.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<script src="js/main.js"></script>
<script src="js/ekko-lightbox.js"></script>
<script src="js/bootstrap.js"></script>
<script>
$(document).delegate('*[data-toggle="lightbox"]', 'click', function(event) {
event.preventDefault();
$(this).ekkoLightbox();
});
$(function () {
$('[data-hover="tooltip"]').tooltip()
})
</script>

大家好,我正在用 Bootstrap (灯箱)做一个小元素,我希望我的图片在我点击它后大小相同,即使它们的尺寸都不同。下面是 html 和 css 代码谢谢...

.photos{
margin: 0;
padding: 0;
}

.photos li{
list-style: none;
float: left;
margin: 5px;
width: 23%;
}

.photos img{
width: 100%;
}
<section>
<section id="clients" class="content-section text-center">
<div class="container">
<h2>My gallery</h2>
<ul class="photos gallery-parent">
<li><a href="img/intro-bggg.jpg" data-title="Baha’i Gardens" data-footer="Hanging Baha’i Gardens and Golden Dome (Haifa)" data-toggle="lightbox" data-gallery="My gallery" data-parent=".gallery-parent"data-hover="tooltip" data-placement="top" title="Baha’i Gardens" ><img src="img/intro-bggg.jpg" class="img-thumbnail"></a></li>

<li><a href="img/bahais sad.jpg" data-title="bahais sad" data-footer="bahais sad" data-toggle="lightbox" data-gallery="My gallery" data-parent=".gallery-parent" data-hover="tooltip" data-placement="top" title="bahais sad" ><img src="img/bahais sad.jpg" class="img-thumbnail"></a></li>
</ul>
</div>
</section>

最佳答案

您是否尝试过通过 CSS 指示图像的固定宽度?标签将选择您打开的图像。示例:

网址:http://www.jasonbutz.info/bootstrap-lightbox/

#demoLightbox img {
width: 500px ;
}

关于javascript - 带有 html css bootstrap 的小元素(灯箱),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34181378/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com