html - Multiple background images with initial and url() -
on page, want have buttons little icons on left side of them, this:
the button background should default of browser.
when specify background image, initial
background image get's overwritten. thought specifing multiple background images fix problem:
background-image: initial, url("edit.png"); /* background-position .... */
but isn't supported; can't use initial
in context (only url()
works).
is there way favorable without using image?
here's how i'd achieve effect you're after:
<button>edit</button> button:before { content: ""; display: inline-block; background-image: url('http://placekitten.com/10/10'); width: 10px; height: 10px; margin-right: 5px; }
result:
demo: http://jsfiddle.net/q76ur/1/
this allow set separate background-image button required.
Comments
Post a Comment