LoginSignup
0
0

More than 3 years have passed since last update.

【メモ】backgroundの使い方

Posted at

background

背景(画像)は以下の設定で行う

sample.html.erb
<body>
  <div class="top_wallpaper">
|
|
|
sample.css
.top_wallpaper{
  background-image: url(/wallpaper-new.jpg);
}

【CSS】
・該当するクラスに対し"background-image"を使用

書き方

background-image: url(/xxx.yy)
 ・/:フォルダの場所("/"のみの場合publicフォルダが自動的に適用)
 ・xxx:ファイル名
 ・yy:拡張子名

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