Home >Web Front-end >HTML Tutorial >Ask a question about the form_html/css_WEB-ITnose
I inserted a picture into one of the tds. It used to be that when the mouse was on this line, it turned green. Now when the mouse is on this line, the background color of the td does not change when the background picture is added.
.spectd{
background:url("images/xp.png") no-repeat center;
}
.spectr{event:expression(onmouseover=function(){this.style. background='green';},onmouseout=function(){this.style.backgroundColor='white'})}
I think it has actually changed color and is blocked by the picture, so you can’t see it
No, I tried it directly Change the background color to green, and you can see the green color. The background image does not fill the entire td, so you can see the background color changed. I use IE9
and just set the background attributes separately.
background-image:url("images/xp.png");
background-repeat:no-repeat;
background-position:center;