CSS value as mathematical expression

前端 未结 4 1157
一向
一向 2021-02-07 07:30

Is there anyway that I can write a css value as mathematical expression? Example:

div{
    height: 50% + 30px;
    width: 40em - 5px;
   }

If t

4条回答
  •  醉酒成梦
    2021-02-07 07:36

    Take a look at calc() function in CSS. Hopefully the support for this will increase in browsers.

提交回复
热议问题