📜  基于视口的 CSS 流体类型大小 - CSS 代码示例

📅  最后修改于: 2022-03-11 14:47:34.151000             🧑  作者: Mango

代码示例1
/* NOTE: The [brackets] are not included in the syntax. 
BUT, the 'px' denomination needs to be.
If 'px' is not noted, it's just the numerical value. */

.whateverClassBeingTargeted {
  font-size: calc([minimum size px] + ([maximum size] - [minimum size]) * ((100vw - [minimum viewport widthpx]) / ([maximum viewport width] - [minimum viewport width])));
}

/* THERE IS ALSO 'CLAMP' BUT IT HASN'T BEEN CONSISTENT AMONG ALL BROWSERS */