我有两件事。
- 我的最后一个列表项绝对位于无序列表的底部,但它与无序列表的底部重叠。
- 我想将绝对底部与“JQuery 等列高度”一起使用,这样我的两列就彼此相等,因为我计划使用斜 Angular 边框。
我正在寻找有人来帮我解决这个问题,因为我现在陷入困境。
这是我的 jsfiddle,最后一个列表项绝对位于底部: http://jsfiddle.net/evanmoore/QPQ8Z/
这是 jquery 与最后一个列表项绝对底部相等的列高 http://jsfiddle.net/evanmoore/mCang/2/
var maxHeight = 0;
function setHeight(column) {
//Get all the element with class = col
column = $(column);
//Loop all the column
column.each(function() {
//Store the highest value
if($(this).height() > maxHeight) {
maxHeight = $(this).height()+2;
}
});
//Set the height
column.height(maxHeight);
}
$(document).ready(function() {
setHeight('.wrapper');
});
最佳答案
最初将#disclosure li.notes
的position
设置为relative
。这将使较高的列被推低,因此您可以获取 maxHeight。然后,在获得该数字后,将其设置回绝对值,这样它就可以是 bottom: 0
。
关于jquery - 列表项绝对底部与 JQuery 等列高,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11540622/