I have a slider implemented for latest movies coming in. The images are loaded from css background image property. Is there any way to call this background images dynamically into the slider only using css background property
Asked
Active
Viewed 612 times
0
-
2can you please show your code?,so that i can try to help.... – KesaVan Mar 07 '14 at 07:12
-
You can do so "only using css background property" but for doing so dynamically you'll need some scripting language like js. – T J Mar 07 '14 at 07:25
1 Answers
0
You cant just Css background property. You need to call some jquery/javascript.
In Javascript you can for() like this;
var array = ["#000000","#cc0000","#444444"];
for ( var i=0; i<array.length; i++){
$('.sampleDiv').css('background',''+array[i]+'');
}
its just a idea,
And Maybe you can call array with javascript setInterval();
Check FIDDLE

mehmetakifalp
- 445
- 5
- 16