ウェブ学のすすめ

Study of Web Design & Programing

CSSで背景画像を設定する

課題

【CSS06】

  • 画像のような表示になるよう指定しなさい
  • 色・文字サイズは自由設定(バランスは考慮すること)
  • 解答は、エンベッド
  • DTDは各自選択

素材

見本

引用元:文字の修飾 - Webデザインの勉強|忘筌

解答

背景画像を設定 - jsdo.it - share JavaScript, HTML5 and CSS

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title>背景画像を設定</title>
<style type="text/css">
body {
    background-image: url(20120415203049.gif);
}
</style>
</head>
<body>
</body>
</html>