Reputation: 1613
Normally, i want the red arrow to not display. But when a user hovers their mouse over "My Cart (0)" I want the red arrow to display. how can u do this with html/css?
Upvotes: 1
Views: 992
Reputation: 320
You can use a little CSS trick to make an arrow from a div using it's borders, then show it when a user :hover
your cart. Hover the black rectangle in this example.
Upvotes: 0
Reputation: 4395
you can try this: http://jsfiddle.net/ePf3A/
What this does is change the width of the image to show/hide the arrow.
.cart {
background:url(https://i.sstatic.net/D2o7H.png);
width: 100px;
height: 45px;
display: block;
}
.cart:hover {
width: 150px;
}
The other option is use a different image and change between then.
Upvotes: 2