CSS - exp()
概要
形式 | exp(number) |
---|---|
サポート | https://caniuse.com/mdn-css_types_exp |
説明
exp(number
) は自然対数の底 e
の number
乗を返します。pow(e, number)
と同義です。指数関数的な数値を求める際に使用されます。
使用例
CSS
h1 { font-size: calc(1rem * exp(1.25)); } h2 { font-size: calc(1rem * exp(1.00)); } h3 { font-size: calc(1rem * exp(0.75)); } h4 { font-size: calc(1rem * exp(0.50)); } h5 { font-size: calc(1rem * exp(0.25)); } h6 { font-size: calc(1rem * exp(0.00)); }
HTML
<h1>H1: AAA</h1> <h2>H2: AAA</h2> <h3>H3: AAA</h3> <h4>H4: AAA</h4> <h5>H5: AAA</h5> <h6>H6: AAA</h6>
表示
H1: AAA
H2: AAA
H3: AAA
H4: AAA
H5: AAA
H6: AAA
リンク
- https://drafts.csswg.org/css-values/#funcdef-exp
- https://developer.mozilla.org/en-US/docs/Web/CSS/exp
- https://caniuse.com/mdn-css_types_exp
Copyright (C) 2022 杜甫々
初版:2025年5月11日、最終更新:2025年5月11日
http://www.tohoho-web.com/css/func/exp.htm