Home > Web Front-end > HTML Tutorial > Ask a question about the form_html/css_WEB-ITnose

Ask a question about the form_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:24:00
Original
968 people have browsed it

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'})}


Physical business hall
3
< td class="spectd" onclick="alert(1)">View details

I would like to ask, how can I make this line appear when the mouse is over it? All td background colors change. Thanks for the answer.


Reply to the discussion (solution)

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;

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template