简体   繁体   English

如何堆叠 <fieldset> 在彼此之上而不影响引导程序的面板类?

[英]How to stack the <fieldset> on top of each other without affecting the panel class of bootstrap?

I need to stack the fieldsets on top of each other so that i can call next fieldsets using jquery. 我需要将字段集彼此堆叠,以便可以使用jquery调用下一个字段集。 First fieldset is shown while the other two are hidden. 显示第一个字段集,而其他两个隐藏。 When i user position:absolute, it will stack on top of each other but the bootstrap panel gets affected and the form goes outside of the panel. 当我使用position:absolute时,它将堆叠在一起,但是引导面板受到影响,并且表单不在面板的外部。 how do i do this such that the panel doesnt get affected.? 我该如何做才能使面板不受影响?

#msform fieldset {
  /*stacking fieldsets above each other*/
  position: absolute;
}
/*Hide all except first fieldset*/
#msform fieldset:not(:first-of-type) {
  display: none;
}
<div class="panel panel-default">
  <div class="panel-body">
    <!-- ===================================== -->
    <!-- MULTI STEP FORM -->


    <form id="msform" class="black-color">
      <!-- fieldsets -->
      <fieldset >

      </fieldset>

      <fieldset>

      </fieldset>

      <fieldset>

      </fieldset>
    </form>
    <!-- MULTI STEP FORM -->
    <!-- ===================================== -->
  </div>
</div>

jsfiddle here jsfiddle在这里

Are you looking for something like this, as in stacked? 您是否正在寻找像这样的东西?

 #msform fieldset { /*stacking fieldsets above each other*/ position: absolute; width: 100px; height: 100px; } /*Hide all except first fieldset*/ /*#msform fieldset:not(:first-of-type) { display: none; } */ #msform fieldset:nth-child(1) { top: 5px; left: 5px; } #msform fieldset:nth-child(2) { top: 10px; left: 10px; } #msform fieldset:nth-child(3) { top: 15px; left: 15px; } 
 <div class="panel panel-default"> <div class="panel-body"> <!-- ===================================== --> <!-- MULTI STEP FORM --> <form id="msform" class="black-color"> <fieldset > </fieldset> <fieldset> </fieldset> <fieldset> </fieldset> </form> <!-- MULTI STEP FORM --> <!-- ===================================== --> </div> </div> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用一个类拥有多个列表项实例,而又不会互相影响 - how to have more than one instance of list item using a class without affecting each other 如何在不影响其他元素的情况下使用 bootstrap 折叠? - How to use bootstrap collapse without affecting other elements? 如何使多个在同一网页上添加另一个字段而不互相影响? - How to have multiple add another field on the same web page without each affecting each other? 如何在同一网页上具有多个字符计数,而每个字符计数互不影响? - How to have multiple character counts on the same web page without each character count affecting each other? 将动画彼此叠加是不好的做法吗? - Is it bad practice to stack animations on top of each other? 可拖动项以可排序的方式彼此堆叠 - draggable items stack on top of each other in a sortable 将图像/图标链接堆叠在一起 - Stack Image/Icon Links on top of each other 如何从一组兄弟姐妹中删除一个类而不影响同一个类的其他元素 - How to remove a class from one set of siblings without affecting other elements with same class 如何在不影响其他元素的情况下扩展DIV - How to expand a DIV without affecting other elements 删除类别而不影响具有相同类别的其他div - Remove class without affecting other divs with the same class
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM