[英]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>
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.