background-position

書式 background-position:横位置 縦位置
対象ブロックレベル要素、置換要素
継承しない
初期値 0% 0%
解説
背景画像の表示位置を示します。
サンプルコード
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
<style type="text/css"><!--
body { margin:0px; }
div { position:absolute; top:10;left:10px;
background-image:url(bg.jpg);
width:100px;
background-position:10px 5px;
}
--></style>
</head>
<body>
<img src="Default.png">
<div>Dashboard Sample text.</div>
</body>
</html>
実際のサンプルをダウンロード