mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-08 17:22:31 +03:00
Overall responsive img styles
`img`s are no longer responsive by default. Instead, use `.img-responsive` as a class or mixin. Existing `.thumbnail > img` and `.img-thumbnail` classes now make use of this as a mixin as well.
This commit is contained in:
@@ -59,12 +59,14 @@ a:focus {
|
||||
// -------------------------
|
||||
|
||||
img {
|
||||
// Responsive images (ensure images don't scale beyond their parents)
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
// Responsive images (ensure images don't scale beyond their parents)
|
||||
.img-responsive {
|
||||
display: block;
|
||||
max-width: 100%; // Part 1: Set a maximum relative to the parent
|
||||
height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
|
||||
|
||||
// Match vertical alignment with other comment elements
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
// Rounded corners
|
||||
|
||||
Reference in New Issue
Block a user