演示代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
div{
width: 500px;height: 400px;
background-color: #00ff00;
background-image: url(bj.jpg);
background-repeat: no-repeat;
/* background-position: right bottom; */
/* background-position: 50px 100px; */
background-position: 100% 100%; /* 右下角 */
}
</style>
</head>
<body>
<!--
背景定位:
background-position: x y; 水平,垂直
1,方向定位:top上,bottom下,left左,right右,center中
2,当设置一个值,另一个值就是center
3,尺寸单位,参考位置元素左上角和背景图片左上角,设置一个值,这个值一定是水平位置
4,百分比单位:0% 0%左上角;100% 100%右下角
-->
<div></div>
</body>
</html>