Skip to content

Avada 的响应式字体

  • by

公式还需要点数学呢


.fusion-responsive-typography-calculated {
    --minFontSize: calc(var(--typography_factor) * var(--base-font-size));
    --minViewportSize: 360;
    --maxViewportSize: var(--grid_main_break_point);
    font-size: calc((A * 1px) - (B * (A - C) * (E * 1px - 100vw))/ (D - E) - (A - C) * B * 1px)!important;
}

A, var(--fontSize)
B, var(--typography_sensitivity)
C, var(--minFontSize)
D, var(--maxViewportSize)
E, var(--minViewportSize)

var(--typography_factor) 1.5
var(--typography_sensitivity) 0-1

翻译成能看懂的话:

typography sensitivity 决定了缩放比例,0 不缩小

页面越宽字体越大

Leave a Reply

Your email address will not be published. Required fields are marked *