Images won't display through CSS -


if try set background image using css, flat out not load. if use same path in html, will. making slider of these images, hence need work css. i've browsed every answer on internet similar problems , nothing works.

relevant html:

                <div class="slider-container">                     <div class="slider5"></div>                     <div class="slider4"></div>                     <div class="slider3"></div>                     <div class="slider2"></div>                     <div class="slider1"></div>                 </div> 

css:

.slider-container { overflow: hidden; width: 100%; height: auto; 

}

.slider1, .slider2, .slider3, .slider4, .slider5 { width: 100%; height: auto; position: static; top: 0px; cursor: pointer; transition: 0s linear; -webkit-transition: 0s linear; -moz-transition: 0s linear; -o-transition: 0s linear; 

}

.slider1 { background: url(../images/jbscomicback.jpg) no-repeat; display:block; animation: cycle 25s linear infinite; -webkit-animation: cycle 25s linear infinite; -o-animation: cycle 25s linear infinite; -moz-animation: cycle 25s linear infinite; 

}

^repeated each .slider(number)

set height

updated css

.slider-container { overflow: hidden; width: 100%; height: auto;} .slider1, .slider2, .slider3, .slider4, .slider5 { width: 100%; height: 400px; /*------------height-----------*/ position: static; top: 0px; cursor: pointer; transition: 0s linear; -webkit-transition: 0s linear; -moz-transition: 0s linear; -o-transition: 0s linear;    } .slider1{background:url(background: url(http://dummyimage.com/600x400/000/fff) no-repeat;) no-repeat; display:block; animation: cycle 25s linear infinite; -webkit-animation: cycle 25s linear infinite; -o-animation: cycle 25s linear infinite; -moz-animation: cycle 25s linear infinite; } 

html

<div class="slider-container">                 <div class="slider1"></div>                 <div class="slider1"></div>                 <div class="slider1"></div>             </div> 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

html - Is there any way to exclude a single element from the style? (Bootstrap) -

Delphi 7 and decode UTF-8 base64 -