Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
acf2a640
Commit
acf2a640
authored
Sep 03, 2012
by
Mark Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes #4935: properly comment responsive image techniques and add CSS tests to support
parent
8cda830e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
2 deletions
+42
-2
less/reset.less
less/reset.less
+4
-2
less/tests/css-tests.html
less/tests/css-tests.html
+38
-0
No files found.
less/reset.less
View file @
acf2a640
...
@@ -77,9 +77,11 @@ sub {
...
@@ -77,9 +77,11 @@ sub {
// -------------------------
// -------------------------
img {
img {
max-width: 100%; // Make images inherently responsive
/* Responsive images (ensure images don't scale beyond their parents) */
max-width: 100%; /* Part 1: Set a maxium relative to the parent */
width: auto\9; /* IE7-8 need help adjusting responsive images */
width: auto\9; /* IE7-8 need help adjusting responsive images */
height: auto; // Make images inherently responsive
height: auto; /* Part 2: Scale the height according to the width, otherwise you get stretching */
vertical-align: middle;
vertical-align: middle;
border: 0;
border: 0;
-ms-interpolation-mode: bicubic;
-ms-interpolation-mode: bicubic;
...
...
less/tests/css-tests.html
View file @
acf2a640
...
@@ -98,6 +98,44 @@
...
@@ -98,6 +98,44 @@
<!-- Responsive images
================================================== -->
<div
class=
"page-header"
>
<h1>
Responsive images
</h1>
</div>
<div
class=
"row"
>
<div
class=
"span4"
>
<img
src=
"http://placehold.it/600x600"
height=
"200"
>
</div>
<div
class=
"span4"
>
<img
src=
"http://placehold.it/600x600"
>
</div>
<div
class=
"span4"
>
<img
src=
"http://placehold.it/600x600"
>
</div>
</div>
<br>
<div
class=
"row"
>
<div
class=
"span4"
>
<img
src=
"http://placehold.it/600x900"
style=
"width: 200px;"
>
</div>
<div
class=
"span4"
>
<img
src=
"http://placehold.it/200x300"
>
</div>
<div
class=
"span4"
>
<img
src=
"http://placehold.it/600x600"
>
</div>
</div>
<br><br>
<!-- Fluid grid
<!-- Fluid grid
================================================== -->
================================================== -->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment