gpt4 book ai didi

jquery - 如果我设置 float left 高度不起作用

转载 作者:行者123 更新时间:2023-11-28 18:40:16 25 4
gpt4 key购买 nike

如果我将 float left 设置为 jquery 的高度不起作用网址是http://imperiorwebdesign.com/portofoliu我在 css 中设置了高度,但我不喜欢它的工作方式

(function($) {

$.Tabs = function(el, options) {

var base = this;
base.$el = $(el);
base.$nav = base.$el.find(".nav");

base.init = function() {

base.options = $.extend({},$.Tabs.defaultOptions, options);

// Accessible hiding fix
$(".hide").css({
"position": "relative",
"top": 0,
"left": 0,
"display": "none"
});

base.$nav.delegate("li > a", "click", function() {

// Figure out current list via CSS class
var curList = base.$el.find("a.current").attr("href").substring(1),

// List moving to
$newList = $(this),

// Figure out ID of new list
listID = $newList.attr("href").substring(1),

// Set outer wrapper height to (static) height of current inner list
$allListWrap = base.$el.find(".list-wrap"),
curListHeight = $allListWrap.height();
$allListWrap.height(curListHeight);

if ((listID != curList) && ( base.$el.find(":animated").length == 0)) {

// Fade out current list
base.$el.find("#"+curList).fadeOut(base.options.speed, function() {

// Fade in new list on callback
base.$el.find("#"+listID).fadeIn(base.options.speed);

// Adjust outer wrapper to fit new list snuggly
var newHeight = base.$el.find("#"+listID).height();
$allListWrap.animate({
height: newHeight
});

// Remove highlighting - Add to just-clicked tab
base.$el.find(".nav li a").removeClass("current");
$newList.addClass("current");

});

}

// Don't behave like a regular link
// Stop propegation and bubbling
return false;
});

};
base.init();
};

$.Tabs.defaultOptions = {
"speed": 300
};

$.fn.Tabs = function(options) {
return this.each(function() {
(new $.Tabs(this, options));
});
};

})(jQuery);
$(function() {

$("#pagew").Tabs({
"speed": 200
});

});`

最佳答案

对我来说这听起来像是一个清除问题,您可能需要向周围的 div 添加一个清除。

这里有一篇关于该主题的好文章 - http://css-tricks.com/snippets/css/clear-fix/

关于jquery - 如果我设置 float left 高度不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11670488/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com