当我在当前选择的 div 之前或之后插入一个新的空白 space div 时,突然 jquery 中的选项卡高度增加了?

while i inserted a new empty white space div before or after the current selected div,suddenly the tabs Height is increased in jquery?

我的项目是创建一个 google 模块选项卡 application.IT 通常包含 5 个选项卡。如果我点击第一个选项卡,一个空的 space li 按照 insertbefore() 跟随当前选择的列表。通过这个我遇到了一个问题...... 选项卡容器内的 5 个选项卡。 如果创建了一个空列表。选项卡高度增加。我认为 css 属性 中的一个小问题.. 注意:Tab 容器被视为 LightGrey

的背景颜色

this image contains normal view and after viewing of click events

注:-

这个项目包含I.html这是主要代码文件

here i am uploaded the shareable link of my project

您需要在元素上设置 font-size: 0 以阻止这种情况发生。

或者,您可以设置 display: block,这样浏览器就不会将该元素视为文本。