How to disable vertical scroll in bootstrap column

后端 未结 3 2054
情话喂你
情话喂你 2021-01-14 09:07

I have two bootstrap columns \"left\" and \"right\"; I want to fix the left column with the screen and disable scroll. but i want to enable scroll in the right column which

3条回答
  •  春和景丽
    2021-01-14 09:21

    You can achieve this by simply applying some CSS:

    • Both columns should have a height of your complete viewport -> height: 100vh;
    • The scrollable column should also have overflow-y set to scroll.

    Here is an example: https://jsfiddle.net/kLu69r7t/

    .fixed-col {
      height: 100vh;
    }
    
    .scrollable-col {
      height: 100vh;
      overflow-y: scroll;
    }
    

    Of course you need to give the columns the respective classes.

提交回复
热议问题