2-3 为什么鼠标滑过button时,background-color不是会把url图标给覆盖掉吗?

来源:2-3 轮播图上按钮样式

TeLiCH

2018-04-14 21:31:50

.button{
	position: absolute;
	width: 40px;
	height: 80px;
	left: 244px; 
	top: 50%;
	margin-top: -40px;
	background: url(../image/arrow.png) no-repeat center center;
}

.button:hover{
	background-color: #333;
	opacity: 0.8;
	filter: alpha(opacity=80)

}

为什么url还会有一个箭头出来,而不是url整个图包括白色部分一起出来?难道url的图就只有一个箭头,其他都是没有像素的?

写回答

1回答

Miss路

2018-04-15

两个不冲突的,背景颜色和背景图片可以同时存在,背景颜色会靠下。祝学习愉快!

0
heLiCH
h 非常感谢!
h018-04-15
共1条回复

0 学习 · 36712 问题

查看课程