タグ

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

  • 関連タグはありません

タグの絞り込みを解除

CSSとcssとcalcに関するnibushibuのブックマーク (2)

  • CSSの calc() ファンクションを使って長さを計算しサイズ指定する方法

    CSSで長さを計算できるcalc()ファンクションというのはご存じですか? ここのところ流行りのレスポンシブデザインもそうですが、コンテンツの幅をフレキシブルに対応させたいという場合に、とても役立つファンクションです。 今回はこのcalc()ファンクションの使い方や、ブラウザのサポート状況をご紹介したいと思います。 親要素の幅を超えないようにする calc()ファンクションにはいろいろな使い方があるんですが、代表的なところで言えば画像などのコンテンツ幅が親要素の幅を超えないようにするという使い方。 通常、コンテンツ幅をフレキシブルに対応させるだけなら、CSSのmax-widthプロパティに対して100%と値を指定すりゃいいわけです。 しかし、ここにpaddingやborderといったプロパティを与えた途端に、親要素の幅をサラリと超えてきやがります。子の成長が著しい。 paddingを与えた

    CSSの calc() ファンクションを使って長さを計算しサイズ指定する方法
  • A Creative Grid System With Sass and calc() — SitePoint

    Stay Relevant and Grow Your Career in TechPremium ResultsPublish articles on SitePointDaily curated jobsLearning PathsDiscounts to dev toolsStart Free Trial7 Day Free Trial. Cancel Anytime. Before we even get started talking about Sass and the code for this project, let me remind you this is no more than a quick experiment which by no means should be used in a live context. So what follows is only

    A Creative Grid System With Sass and calc() — SitePoint
  • 1