Bootstrap 4 Flex Box圣杯布局和主/细节工作流程

时间:2018-12-14 20:40:22

标签: html5 twitter-bootstrap css3 flexbox flexboxgrid

工作时间太长了。为什么COLUMN02超出了右侧的浏览器边缘?

任何帮助将不胜感激。非常感谢你!

Holy Grail Demo

The table expands off the scree to the right.

详细信息:

  • 目标是在没有脚本的情况下尽可能多地利用FLEX BOX。因此,flex-basis用于列宽和左/右页边距,以在屏幕上/屏幕外移动列。
  • 单击标题中的切换COLUMN01以切换COLUMN01。
  • 单击COLUMN02表的第一行以切换COLUMN03。
  • 单击COLUMN03中的链接以切换COLUMN04。
  • COLUMN02和COLUMN03的宽度可以通过它们之间的调整大小来调整。

我错过了什么导致COLUMN02超出右侧的浏览器边缘?

是否有更好的方法通过FLEX BOX移动这些列?

任何输入都将不胜感激!

enter image description here

html,
body {
    min-height: 100vh; /* force footer to bottom of browser */
    height: 100%;/*for IE11*/
}
.col {
    overflow: hidden; /*enables scrolling for some odd reason*/
    -webkit-transition: 500ms all ease;
    -moz-transition: 500ms all ease;
    -ms-transition: 500ms all ease;
    -o-transition: 500ms all ease;
    transition: 500ms all ease;
    padding: 0;
}
main {
    overflow: hidden;
}

/* CLOSE/OPEN STATES */
.column01 {
    overflow: hidden; /* enables scrolling */
    -webkit-box-flex: 0;
    -ms-flex: 0 0 250px;
    flex: 0 0 250px;
    margin-left: -250px /*positioning does not work well with flex objects*/
}
.column01.open {
    margin-left: 0; /* open by default */
}
.column02 { /* when column03 is closed */
    min-width: 100hv; /* initial width */
    min-width: 150px; /* minimum width */
    -webkit-box-flex: 0 0 auto; /* manual resize */
    -ms-flex: 0 0 auto; /* manual resize */
    flex: 0 0 auto; /* manual resize */
}
.column02.open {/* when column03 is open */
    width: 400px; /* initial width */
}
.splitter {/* enables scrolling */
    -webkit-box-flex: 0;
    -ms-flex: 0 0 10px;
    flex: 0 0 10px;
    margin-right: -10px;
}
.splitter.open {
    margin-right: 0;
}
.column03 {
    min-width: 150px;
    -webkit-box-flex: 0;
    -ms-flex: 0 0 0;
    flex: 0 0 0;
}
.column03.open {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
}
.column04 {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    width: 300px;
    margin-right: -300px;
}
.column04.open {
    margin-right: 0;
}

/* OVERWRITES */
.toggle-column03 {
    cursor: pointer;
}
body {
    font-family: Calibri;
}

/* SPLITTER COLUMN */
.splitter {
    cursor: col-resize;
}
.nav-bordered>.nav-item>.nav-link.active,
.nav-bordered>.nav-item>.nav-link.active:hover,
.nav-bordered>.nav-item>.nav-link.active:focus {
    font-weight: 500;
    color: #1997c6;
    border-bottom-color: #1997c6;
}

再次感谢!

0 个答案:

没有答案