Html 是否可以将背景RGB与URL相结合?
这可能吗?我的代码是:Html 是否可以将背景RGB与URL相结合?,html,css,Html,Css,这可能吗?我的代码是: .w-categories li:hover{ background: rgba(0, 0, 0, 0.1); -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; } 但当我将鼠标悬停在li上时,它会删除侧面背景 禁止悬停 悬停 背景图像:Background:url(../images/w_icon_tag.png)不重复5px 10px尝
.w-categories li:hover{
background: rgba(0, 0, 0, 0.1);
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
border-radius: 6px;
}
但当我将鼠标悬停在li
上时,它会删除侧面背景
禁止悬停
悬停
背景图像:
Background:url(../images/w_icon_tag.png)不重复5px 10px代码>尝试使用背景色:rgba(…)代码>而不是背景:rgba(…)代码>
似乎在这里起作用:是的,可以合并
看看这个
background
将所有背景属性替换为您指定的内容(包括background image
),因此您需要更加具体,即使用background color
。谢谢,巴德,这是我忘记的!谢谢你,伙计。我只是忘了给悬停画背景色。。再次感谢!
background:url(../images/w_icon_tag.png) no-repeat 5px 10px rgba(0, 0, 0, 0.1);