|
|||||||||||||||||||||||||||||
| Alm. rektangulært | |
|---|---|
| CSS |
.img-responsive { display: block; width: 100% \9; max-width: 100%; /* Billedets andel af feltets bredde. */ height: auto; } |
| HTML | <img class="img-responsive" src="../billeder/xxx.jpg"> |
| Rounded | |
| CSS |
.img-responsive { display: block; width: 100% \9; max-width: 100%; height: auto; } .img-rounded { border-radius: 6px; } |
| HTML | <img class="img-responsive img-rounded" src="../billeder/xxx.jpg"> |
| Circle | |
| CSS |
.img-responsive { display: block; width: 100% \9; max-width: 100%; height: auto; } .img-circle { border-radius: 50%; } |
| HTML | <img class="img-responsive img-circle" src="../billeder/xxx.jpg"> |
| Thumbnail | |
| CSS |
.img-thumbnail { display: inline-block; width: 100% \9; max-width: 100%; height: auto; padding: 4px; line-height: 1.42857143; background-color: #fff; border: 1px solid #ddd; border-radius: 4px; transition: all .2s ease-in-out; } |
| HTML | <img class="img-thumbnail" src="../billeder/xxx.jpg"> |
| Luft / positionering | |
|
Både i 'img-responsive' og i 'img-thumbnail' kan tilføjes deklarationerne: 'margin: x%;' Etablerer luft / positionering på en eller flere sider. 'float-left' eller 'float-right' venstre- eller højrestiller billedet og wrapper tekst omkring det. | |