Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

less踩坑 #48

Open
YBFACC opened this issue Sep 28, 2021 · 0 comments
Open

less踩坑 #48

YBFACC opened this issue Sep 28, 2021 · 0 comments

Comments

@YBFACC
Copy link
Owner

YBFACC commented Sep 28, 2021

解决less中无法正确计算calc的问题

在less中使用calc函数进行不同长度单位的计算时,后面值的单位会被忽略,例如:

height: calc(100vh - 50px);

结果等于50vh

解决方法:在表达式前添加"~"

height: calc(~"100vh - 50px");

https://www.cnblogs.com/neeter/p/13424737.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant