Live Demo
>经过IE7 / IE8和最新版本的测试:Firefox,Chrome,Safari,Opera.
>图像的高度完全取决于ul的高度.
>为IE7提供所需的额外规则高度:100%,我使用的是Star hack.如果您需要100%有效的CSS,可以使用conditional comments或Star plus hack.
CSS:
#iContainer {
background: #ccc;
overflow: hidden;
position: relative
}
#iContainer div {
position: absolute;
top: 0; right: 0; bottom: 0; left: 0;
*height: 100% /* just for you, IE7 */
}
#iContainer img {
height: 100%
}
#iContainer ul {
float: right
}
HTML:
- list 1
- list 2
- list 3
- list 4
- list 5
- list 6
- list 7
- list 8
大粉红图像: