hadesg
hadesg

Reputation: 17

Hover image using css

I'm trying to create a hover image for my 'read more' button on blogger. I'm trying to reference:

<b:if cond='data:post.hasJumpLink'>
      <div class='jump-link'>
        <a expr:href='data:post.url' expr:title='data:post.title'><img src='http://3.bp.blogspot.com/-JpvWYCR8FXA/Vp1oL9cD7BI/AAAAAAAAAe4/1PRPh1ASGG8/s1600/extendedreadmore.png'/></a>
      </div>
    </b:if>

with this css:

 .jump-link:hover  {
        background: url('http://1.bp.blogspot.com/-i936l-GupbU/Vp4Z9y7tpAI/AAAAAAAAAgw/lyJYJds5PNc/s1600/readmorerollover.jpg');
    }

but it's not appearing. I've tried several variations and can't seem to find any similar topics that find a solution.

Upvotes: 0

Views: 123

Answers (2)

Mukul Kant
Mukul Kant

Reputation: 7122

You can try like this-

.jump-link:hover  {
        background: url('http://1.bp.blogspot.com/-i936l-GupbU/Vp4Z9y7tpAI/AAAAAAAAAgw/lyJYJds5PNc/s1600/readmorerollover.jpg') no-repeat	;
    }
    .jump-link:hover img{opacity:0;}
<b:if cond='data:post.hasJumpLink'>
      <div class='jump-link'>
        <a expr:href='data:post.url' expr:title='data:post.title'><img src='http://3.bp.blogspot.com/-JpvWYCR8FXA/Vp1oL9cD7BI/AAAAAAAAAe4/1PRPh1ASGG8/s1600/extendedreadmore.png'/></a>
      </div>
    </b:if>

I hope I'll helps you.

Upvotes: 1

twan
twan

Reputation: 2659

You are using background as a standalone property.

What you are looking for is:

.jump-link:hover  
    {
        background-image: url('http://1.bp.blogspot.com/-i936l-GupbU/Vp4Z9y7tpAI/AAAAAAAAAgw/lyJYJds5PNc/s1600/readmorerollover.jpg');
    }

More information Here

Upvotes: 0

Related Questions