Difference between revisions of "Bootstrap responsive image"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(See also)
Line 3: Line 3:
 
== Example ==
 
== Example ==
  
<pre>
+
<nowiki>
<img src="image.jpg" alt="example" class="img-responsive" />
+
<img src="image.jpg" alt="example" class="img-responsive" />
</pre>
+
</nowiki>
  
 
The image will expand to fit the available space, up to the full image size.
 
The image will expand to fit the available space, up to the full image size.
Line 15: Line 15:
 
* [[Class selector (CSS)]]
 
* [[Class selector (CSS)]]
 
* [[Responsive web design]]
 
* [[Responsive web design]]
 +
 +
[[Category:Bootstrap (framework)]]

Revision as of 17:52, 21 April 2016

In Bootstrap, you make an image responsive by adding the img-responsive class.

Example

<img src="image.jpg" alt="example" class="img-responsive" />

The image will expand to fit the available space, up to the full image size.

See also