欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  web前端

图片的“background”设置疑问 (100% 速结贴)_html/css_WEB-ITnose

程序员文章站 2024-02-06 14:48:22
...
对图片使用半透明效果
.tit {
position: absolute;
left: 0;
bottom: 0;
height: 27px;
background: rgba(255,255,255,0.8) url(../images/bg-item-tit2.png) right bottom no-repeat;
background-size: auto 16px;
width: 100%;
overflow: hidden;
}

问题:这里的“background”设为了“right bottom”对齐。 改为“center center”,也没有什么影响。 为什么要设置背景对齐的角度呢??? 有没有这样不同的案例可以区分。


回复讨论(解决方案)

http://paranimage.com/css-background-attribute/ 讲的很详细

就从一点来说,
如果 background-size不起作用,你说会怎么样