Calc of max, or max of calc in CSS

前端 未结 8 2497
小蘑菇
小蘑菇 2020-11-28 06:18

Is it possible to do something like this

max-width: calc(max(500px, 100% - 80px))

or

max-width: max(500px, calc(100% - 80px         


        
8条回答
  •  -上瘾入骨i
    2020-11-28 06:46

    No you cannot. max() and min() have been dropped from CSS3 Values and Units. They may be re-introduced in CSS4 Values and Units however. There is currently no spec for them, and the calc() spec does not mention that either are valid inside a calc() function.

提交回复
热议问题