2016-02-26 41 views

回答

0

你可以給類股利和可以風格它的CSS像

.hello:hover { 
 
    background-image:url("image url here"); 
 
}
<div class="hello">Content here</div>

0

一個最簡單的方式來實現,這將被添加一小段JavaScript到div - onmouseover="document.getElementById('textid').style.display = 'none';"

1

HTML:

<div>Keyword</div> 

CSS:

div { 
    background: #999; 
    width: 200px; 
    height: 200px; 
} 

div:hover { 
    background-image: url('http://rs267.pbsrc.com/albums/ii282/paullasue/ATT859028.gif~c200'); 
} 

嘗試在這裏:https://jsfiddle.net/qgd83cw3/

0

試試這個方法:

HTML:

<div id="Insert_here">Name 
<div id="Image">Name //Or whatever you call it. 

CSS:

#Insert_here #Image{display:none;} 
    #Insert_here:hover #Image{display:inline-block; visibility:visible;} 
//This turns makes the image appear after you hover over the text/coloured box