How to use calc() inside another function
问题 Is it possible to use calc() inside of a CSS function like transform or translate ? I cannot seem to get it working. Here is a demo so you guys can play around: http://jsfiddle.net/qdJwY/1/ 回答1: You can use calc() wherever you can use a length based value in CSS. The example you have provided does work, but actually adds up to 0. Here is a slightly changed demo to illustrate: http://jsfiddle.net/joshnh/6ydR3/ Also, make sure to list the unprefixed version last. Mixing percentages with other