2
0
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:
Mark Otto
2013-06-28 00:09:10 -07:00
parent 1a09eada35
commit 09cdee2f03
3 changed files with 22 additions and 9 deletions
+6 -4
View File
@@ -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