This time I will show you how to use the calc() method of CSS3. What are the precautions when using the calc() method of CSS3? The following is a practical case, let’s take a look. take a look.
The following code introduces you to the calc() method in css3. The specific content is as follows:<p style="width:100px; height:50px; background:red;"> <p style="width:100%; height:20px; margin:5px; background:green;"></p> </p>
<p style="width:100px; height:50px; background:red;"> <p style="width:calc(100% - 10px); height:20px; margin:5px; background:green;"></p> </p>
Instructions for use
All mainstream desktop browsers support it. It is said that mobile browsers hardly support it.
I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!
Recommended reading:
How to use redrawing and reflowHow to use CSS settings to record user passwordsThe above is the detailed content of How to use the calc() method of CSS3. For more information, please follow other related articles on the PHP Chinese website!