区别:
1.设置背景图片靠右对齐:
background:url(...) no-repeat right center;
2.改变背景图片的原始坐标位置:
background: url(...) 0 -16px no-repeat;
1.设置背景图片靠右对齐:
background:url(...) no-repeat right center;
2.改变背景图片的原始坐标位置:
background: url(...) 0 -16px no-repeat;
2015-06-02
.mainbox{width:960px;height:300px;background:#cff;}
.leftbox{width:740px;height:300px;background:#c9f;float:left;}
.rightbox{width:210px;height:300px; background:#fcf;float:right;}
</style>
</head>
<body>
<div class="mainbox">
<div class="leftbox"></div>
<div class="rightbox"></div>
</div>
.leftbox{width:740px;height:300px;background:#c9f;float:left;}
.rightbox{width:210px;height:300px; background:#fcf;float:right;}
</style>
</head>
<body>
<div class="mainbox">
<div class="leftbox"></div>
<div class="rightbox"></div>
</div>