CSS Calc((100%/5)+10px) isn't working

 ̄綄美尐妖づ 提交于 2019-12-02 18:48:12

问题


Alright so in my CSS I'm trying to do the math calc((100%/5)+10px); When I do this It doesn't work. When I do calc(100%/5); It works just fine. What do I need to do to get the +10px working?


回答1:


What you need to do, is use the proper syntax:

calc((100%/5) + 10px)

https://developer.mozilla.org/en-US/docs/Web/CSS/calc: “Note: The + and - operators must always be surrounded by whitespace.”



来源:https://stackoverflow.com/questions/25298829/css-calc100-510px-isnt-working

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!