如下css代码已在上帖完美通过
#header { height:100px; background:#9c6 url("K3C(O8Z{W05SF_OCMRKP]PY.gif") no-repeat; margin-bottom:50px;}
新问:
我如何改以上代码让图片分别:
1.拉抻充满该div块
2.在该块中横竖居中
3.块中横向左对齐
4.块中竖向底对齐
------解决方案--------------------------------------------------------
1,background:#9c6 url("K3C(O8Z{W05SF_OCMRKP]PY.gif"); 只能进行平铺,不能拉伸,拉伸在CSS3中支持
参见
http://dotnet.aspx.cc/article/ac7f6f17-cc42-4b26-9e00-31d5f4671417/read.aspx
http://dotnet.aspx.cc/CSS3/background.htm
2,background:#9c6 url("K3C(O8Z{W05SF_OCMRKP]PY.gif") no-repeat left center;
3,background:#9c6 url("K3C(O8Z{W05SF_OCMRKP]PY.gif") no-repeat center top;
3,background:#9c6 url("K3C(O8Z{W05SF_OCMRKP]PY.gif") no-repeat center bottom;