html - Display image on a gradient background on hover via css -
i have background:
.background:hover { background: #f4f4f4 url(../images/arrow_down_over.gif) no-repeat right; }
that change gradient 1 :
.background:hover{ background: -moz-linear-gradient(top, #f4f4f4 0%, #eeeeee 100%); /* ff3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f4f4f4), color-stop(100%,#eeeeee)); /* chrome,safari4+ */ background: -webkit-linear-gradient(top, #f4f4f4 0%,#eeeeee 100%); /* chrome10+,safari5.1+ */ background: -o-linear-gradient(top, #f4f4f4 0%,#eeeeee 100%); /* opera 11.10+ */ background: -ms-linear-gradient(top, #f4f4f4 0%,#eeeeee 100%); /* ie10+ */ background: linear-gradient(to bottom, #f4f4f4 0%,#eeeeee 100%); /* w3c */ filter: progid:dximagetransform.microsoft.gradient( startcolorstr='#f4f4f4', endcolorstr='#eeeeee',gradienttype=0 ); } /* ie6-9 */
but keep arrow image. can't find way it. did try this:
background: -moz-linear-gradient(top, #f4f4f4 0%, #eeeeee 100%) url(../images/arrow_down_over.gif) no-repeat right; /* ff3.6+ */
or add after gradient properties without success.
background: url(../images/arrow_down_over.gif) no-repeat right;
i can't add class have deal css. idea how it?
you may try:
background: url(../images/arrow_down_over.gif), linear-gradient(...);
multiple backgrounds must comma-separated rather space-separated, , weirdly stack top bottom.
also note not supported browsers.
see http://css-tricks.com/stacking-order-of-multiple-backgrounds/ , https://developer.mozilla.org/en-us/docs/web/guide/css/using_multiple_backgrounds details
Comments
Post a Comment