【发布时间】:2014-01-07 00:48:39
【问题描述】:
请转至:http://jsfiddle.net/6zFt5/
如您所见,如果不在 CSS 的第 6 行指定 FIXED HEIGHT,此旋转器将无法工作。我需要这个小部件根据内容高度动态调整它的高度,而不是剪切它或留下太多空白空间。
这是css:
.rotator {
position: relative;
overflow:hidden;
width: 100%;
border:1px solid red;
height:auto; /*height:100px;*/
}
.rotator ul li {
max-height: 100%;
max-width: 100%;
background-color:aqua;
}
我留下了 jQuery 脚本,所以你可以理解我想用它来做什么。
我错过了什么?
谢谢。
【问题讨论】:
标签: jquery html css-float overflow css-position