js calc() function usage

When the calc() function is used incorrectly, it must be a problem with the usage method. Take a closer look at the precautions:

The calc() function is used to dynamically calculate length values.

  • It should be noted that a space needs to be reserved before and after the operator , for example: width: calc(100% - 10px);
  • Any length value can be calculated using the calc() function;
  • The calc() function supports "+", "-", "*", "/" operations;
  • The calc() function uses standard mathematical operation precedence rules;

 

WeChat official account search: Li Datou . (or scan the QR code) Come and play with me.

More [front-end technology group] and [recommended positions] resources are waiting for you.

I also invite everyone to drink milk tea on the official account from time to time!

If you want to chat with me or have any questions, you can find me on the official account.

Waiting for you~

おすすめ

転載: blog.csdn.net/ljy_1024/article/details/88824266