Created
June 22, 2017 06:28
-
-
Save Yang03/591b52adf87c2074a10fe98d2e5f3cfe to your computer and use it in GitHub Desktop.
css 最小50%,最大100%
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
{ | |
min-width:50%; | |
width: calc((25em - 100%) * 1000); // 当font-size:16px 25*16=400, 100% 大于 400时,min-width起作用,当100%小于400, max-width | |
max-width: 100%; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://jsfiddle.net/flashYang/vj78jzcc/