javascript - CSS Background color fill for the Icons -


i planning use flag image status. please see image

enter image description here

in image want fill background color of flag using css. background color code coming server want update flag's color according color got server

i tried svg not working in ie8. please me how this. in advance help

note: need support ie7 latest browsers. don't want use separate images different colors.

if flag on same background-color, can use .png, cut hole color should appear , use background-color , background-image create desired result.

html

<div class="flag"></div> 

css

.flag {     width: 45px;     height: 54px;     background-color: #f00;     background-image: url(http://i.imgur.com/dd84kjr.png); } 

example on jsfiddle: http://jsfiddle.net/a4ez9/


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -