Maybe you would be interested in a horizontal CSS base without positioning or swimming.
body, html { height:100%; padding:0; margin:0; } #slideshowWrapper { overflow: hidden; width: 100%; height:100%; } #slideshowWrapper:hover { } #slideshowContent { height:100%; width:100%; text-indent:0; display:inline-block; white-space:nowrap; } .slideshowImage_container { height:100%; width:100%; display:inline-block; white-space:normal; text-indent:normal; text-align:center; } #slideshowImage_01 { background-color: #A0D0A8; } #slideshowImage_02 { background-color: #009FE3; } #slideshowImage_03 { background-color: #FCC99A; } #slideshowImage_04 { background-color: #D8B0CB; }
http://jsfiddle.net/GCyrillus/PfbnW/1/
With CSS animations as optional:
(just for show, js is more solid) is not very flexible, it needs to be installed every time you add or remove a container.
#slideshowWrapper { animation: slidemeAnyDir 30s infinite; animation-play-state:running; } #slideshowWrapper:hover { animation-play-state:paused; } @keyframes slidemeAnyDir { 0%, 15%, 100% {text-indent:0;} 17%, 32%, 84%, 98% {text-indent:-100%;} 34%, 49%, 68%, 82% {text-indent:-200%;} 51%, 66%% {text-indent:-300%;} }
Why text indent? because it responds well to the direction in which the document is displayed on the screen. It will slide on the sides, this direction is set on the parents or by default.
G-cyr source share