2015-12-09 58 views
0

小項目,HTML CSS引導(燈箱)

<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>

向大家問好我做自舉(燈箱)小項目,我想我的照片有一次,我點擊它在同一大小,即使他們都是不同的大小。這裏下面HTML & CSS代碼謝謝...

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

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

 
.photos img{ 
 
\t 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>

回答

0

您是否嘗試過指示由CSS圖像的固定寬度?標籤應該是選擇你打開的圖像。例如:

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

#demoLightbox img { 
width: 500px ; 
} 
+0

感謝你的時候,耶穌,但它不工作.. – Alik