ブートストラップ4とフレックスボックスを使用すると、固定幅の左の列と柔軟な右の列で2列のレイアウトをどのように達成できますか?ブートストラップ4フレックスボックス(固定幅のフレキシブルな幅の列)
私はこれを達成する方法についてのドキュメントには何も表示されない...私はバニラのCSSを使用して簡単に十分にそれを行うことができますが、私はすでにそれを引っ張ってるので、私はブートストラップを使用する必要があるような気がします。
ブートストラップ4とフレックスボックスを使用すると、固定幅の左の列と柔軟な右の列で2列のレイアウトをどのように達成できますか?ブートストラップ4フレックスボックス(固定幅のフレキシブルな幅の列)
私はこれを達成する方法についてのドキュメントには何も表示されない...私はバニラのCSSを使用して簡単に十分にそれを行うことができますが、私はすでにそれを引っ張ってるので、私はブートストラップを使用する必要があるような気がします。
これは何か?
#sticky-sidebar {
position:fixed;
max-width: 20%;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row">
<div class="col-xs-4">
<div class="col-xs-12" id="sticky-sidebar">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
</div>
<div class="col-xs-8" id="main">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
</div>
</div
の可能な複製固定されたサイドバーではなく、「固定された柔軟な幅」の列です。例えば。左の列は200ピクセル、右の列は残りのコンテナの幅の100%をとります。したがって、Flexboxを使用したいという要望があります。 – user1960364
これは機能しません。ブラウザのサイズを変更するときに、左の列の幅が保持されません。 – Mark
あなたが探しているものは以下です:
HTML CODE ---- >>
<div class="main-container">
<div class="left">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
<div class="right">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
</div>
CSS ------- >>
.main-container{
display:flex;
flex-direction:row;
}
.left{
min-width:200px;
max-width:200px;
}
またCodepenリンク。
[ブートストラップ内のコンテナ流体による固定幅カラム](https://stackoverflow.com/questions/36060117/fixed-width-column-with-a-container-fluid-in-bootstrap) – ZimSystem