x
 
<!DOCTYPE html>
<html>
<head>
<style>
div { 
  width: 300px;
  height: 300px;
  margin: auto;
  border: solid black 1px;
  background-image: url('/i/logo/w3.png');
  background-repeat: no-repeat;
  background-position-x: center; 
}
</style>
</head>
<body>
<h1>background-position-x 属性</h1>
<p>在此处,背景图像将在 x 轴上(本例中为 div 元素)居中定位。</p>
<div></div>
</body>
</html>