Home > Article > Operation and Maintenance > How to use calc() in CSS3
calc() usage is similar to a function and can set dynamic values for elements:
/* basic calc */ .simpleBlock { width: calc(100% - 100px); } /* calc in calc */ .complexBlock { width: calc(100% - 50% / 3); padding: 5px calc(3% - 2px); margin-left: calc(10% + 10px); }
The above is the detailed content of How to use calc() in CSS3. For more information, please follow other related articles on the PHP Chinese website!