タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

calcに関するfushimikのブックマーク (2)

  • CSS で計算(四則計算)が行える calc() 関数を使ってみよう

    CSS プロパティに指定する値を計算式で書くことができる仕様、calc() 関数について、具体的なサンプルソースをそえて解説してみたいと思います。 CSS の calc() 関数は、CSS プロパティに指定する値を計算式で書くことができる仕様です。 ちょっと前に Firefox 48 が、この calc() 関数の入れ子表記に対応した件で下記のような記事を書いたのですが、その時参考にリンクを張ろうとした、過去に calc() 関数についての解説を書いた記事がもう6年も前の記事で、さすがに古すぎるということでリンクを張れなかったんですが、いい機会なのでちょっと書き直してみます。 Firefox 48 は CSS calc() 関数の入れ子に対応、CSS カスタムプロパティとの併用がより便利に なお、上記記事でも書いたとおり、calc() 関数は現時点で IE (IE11)や Edge を始め

    CSS で計算(四則計算)が行える calc() 関数を使ってみよう
  • Use Cases For CSS Calc

    Use Cases For CSS Calc Where I play around with CSS calc operations. Published by Vincent Pickering on 23rd Sep 2015 at 00:00am Vertical centre If you know the height of the element, CSS Calc can make it super simple to position an element vertical centre and respect a responsive layout. By using this simple equation: calc(50vh – 1/2 the height of element); 50vh is always half the height of the vi

    Use Cases For CSS Calc
    fushimik
    fushimik 2016/03/04
    “50vh is always half the height of the viewport”
  • 1