Riferimento alle immagini CSS di Bootstrap
Immagini Bootstrap
Angoli arrotondati:
Cerchio:
Miniatura:
<img> Classi
Le classi seguenti possono essere utilizzate per lo stile di qualsiasi immagine:
Class | Description | Example |
---|---|---|
.img-rounded | Adds rounded corners to an image (not available in IE8) | |
.img-circle | Shapes the image to a circle (not available in IE8) | |
.img-thumbnail | Shapes the image to a thumbnail | |
.img-responsive | Makes an image responsive (will scale nicely to the parent element) |
Immagini reattive
Crea immagini reattive aggiungendo una .img-responsive
classe al <img>
tag. L'immagine verrà quindi ridimensionata correttamente rispetto all'elemento padre.
La .img-responsive
classe si applica max-width: 100%
, height: auto
, e display:block
all'immagine:
Esempio
<img src="cinqueterre.jpg" class="img-responsive" alt="Cinque Terre">