Created
February 26, 2016 04:40
-
-
Save catoidrobo/7ade372d72735d7ca2c8 to your computer and use it in GitHub Desktop.
cssで最大幅と最小幅を指定する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
img{ | |
max-width: 500px; /* 最大幅 */ | |
min-width: 200px; /* 最小幅 */ | |
} | |
/* | |
これつかえばimgが元のサイズで表示される | |
指定したimgが最大幅よりもあったとき、指定した最大幅で表示される | |
高さはmax-widthとmin-width | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment