LoginSignup
0
0

More than 3 years have passed since last update.

compass を利用した css スプライト

Posted at

CSSスプライトは、一つの画像を利用してCSSで表示画像を指定することで、データ通信を一つの画像の読み込みとして、読み込み負荷を削減することができる。
compass では複数の画像を指定して画像を読み込むことで、コンパイルされたCSSと画像を作成することができる。

1.css_icon フォルダを作成する。

@import "css_icon/*.png";
@include all-icons-sprites;

実行するとCSS スプライト用の大本の画像が作成される。

<div class="画像名"></div>

で画像が表示される。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0