बूटस्ट्रैप छवियां
बूटस्ट्रैप छवि आकार
कोने पर गोलाकार आकृति:
वृत्त:
थंबनेल:
कोने पर गोलाकार आकृति
वर्ग एक छवि में .img-rounded
गोल कोनों को जोड़ता है (IE8 गोल कोनों का समर्थन नहीं करता है):
उदाहरण
<img src="cinqueterre.jpg" class="img-rounded" alt="Cinque Terre">
वृत्त
वर्ग छवि को एक सर्कल में .img-circle
आकार देता है (आईई 8 गोलाकार कोनों का समर्थन नहीं करता है):
उदाहरण
<img src="cinqueterre.jpg" class="img-circle" alt="Cinque
Terre">
थंबनेल
.img-thumbnail
वर्ग छवि को थंबनेल में आकार देता है :
उदाहरण
<img src="cinqueterre.jpg" class="img-thumbnail" alt="Cinque Terre">
उत्तरदायी छवियां
छवियां सभी आकारों में आती हैं। तो स्क्रीन करो। स्क्रीन के आकार में फिट होने के लिए उत्तरदायी छवियां स्वचालित रूप से समायोजित हो जाती हैं।
टैग में एक .img-responsive
वर्ग जोड़कर प्रतिक्रियाशील चित्र बनाएं । <img>
छवि तब मूल तत्व के लिए अच्छी तरह से स्केल हो जाएगी।
.img-responsive
वर्ग लागू होता display: block;
है और छवि पर max-width: 100%;
:
height: auto;
उदाहरण
<img class="img-responsive" src="img_chania.jpg" alt="Chania">
छवि गैलरी
.thumbnail
आप छवि गैलरी बनाने के लिए क्लास के साथ बूटस्ट्रैप के ग्रिड सिस्टम का भी उपयोग कर सकते हैं ।
नोट: आप इस ट्यूटोरियल में बाद में ग्रिड सिस्टम के बारे में और जानेंगे (विभिन्न मात्रा में कॉलम के साथ एक लेआउट कैसे बनाएं)।
उदाहरण
<div class="row">
<div class="col-md-4">
<div class="thumbnail">
<a href="/w3images/lights.jpg">
<img src="/w3images/lights.jpg" alt="Lights" style="width:100%">
<div class="caption">
<p>Lorem ipsum...</p>
</div>
</a>
</div>
</div>
<div class="col-md-4">
<div class="thumbnail">
<a href="/w3images/nature.jpg">
<img src="/w3images/nature.jpg" alt="Nature" style="width:100%">
<div class="caption">
<p>Lorem ipsum...</p>
</div>
</a>
</div>
</div>
<div class="col-md-4">
<div class="thumbnail">
<a href="/w3images/fjords.jpg">
<img src="/w3images/fjords.jpg" alt="Fjords" style="width:100%">
<div class="caption">
<p>Lorem ipsum...</p>
</div>
</a>
</div>
</div>
</div>
उत्तरदायी एम्बेड
साथ ही किसी भी डिवाइस पर वीडियो या स्लाइडशो को ठीक से स्केल करने दें।
कक्षाएं सीधे <iframe>, <एम्बेड>, <वीडियो> और <ऑब्जेक्ट> तत्वों पर लागू की जा सकती हैं।
The following example creates a responsive video by adding an .embed-responsive-item
class
to an <iframe>
tag (the video will then scale nicely to the parent element).
The containing <div>
defines the aspect ratio of the video:
Example
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="..."></iframe>
</div>
What is aspect ratio?
The aspect ratio of an image
describes the proportional relationship between its width and its height. Two common video aspect ratios are 4:3
(the universal video format of the 20th
century), and 16:9 (universal for HD television and European digital
television).
You can choose between two aspect ratio classes:
<!-- 16:9 aspect ratio -->
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="..."></iframe>
</div>
<!-- 4:3 aspect ratio -->
<div class="embed-responsive embed-responsive-4by3">
<iframe class="embed-responsive-item" src="..."></iframe>
</div>
Complete Bootstrap Image Reference
For a complete reference of all image classes, go to our complete Bootstrap Image Reference.