1

HTML:

<span class="btn-cover">
  <img src="../assets/images/btn_page_back_normal.png"  onmouseover="../assets/images/btn_page_back_normal.png" class="date-left" >
</span>

I have not been able to give a hover effect on the img tag is working to try to substitute a different image from angular.js.

I like what the problem is because you need the help of others, does not work.

Martijn Arts
  • 723
  • 7
  • 22
bismute
  • 149
  • 1
  • 4
  • 11
  • Follow Link which i have mentioned http://stackoverflow.com/questions/18813299/changing-image-on-hover-with-css-html http://stackoverflow.com/questions/18032220/css-change-image-src-on-imghover – Sunil Kumawat Mar 25 '15 at 13:58

1 Answers1

6

you need to set the src of the image to the new one

<span class="btn-cover">
  <img src="../assets/images/btn_page_back_normal.png"  
  onmouseover="this.src='../assets/images/btn_page_back_normal.png'" 
onmouseout="this.src='../assets/images/btn_page_back_normal.png'" 
class="date-left" >
</span>

Demo:

<span class="btn-cover">
  <img src="https://www.ricoh.com/r_dc/r/r8/img/sample_08.jpg"  
  onmouseover="this.src='http://www.scanseri.fi/wp-content/uploads/2014/05/sample.jpg'" 
onmouseout="this.src='https://www.ricoh.com/r_dc/r/r8/img/sample_08.jpg'" 
class="date-left" height="100" width="100">
</span>
A.B
  • 20,110
  • 3
  • 37
  • 71