Changing the width of Bootstrap popover

后端 未结 23 1555
北恋
北恋 2020-11-27 10:51

I am designing a page using Bootstrap 3. I am trying to use a popover with placement: right on an input element. The new Bootstrap ensures that if you use

23条回答
  •  眼角桃花
    2020-11-27 11:15

    In bootstrap 4 you can simply override default value of bootstrap variable $popover-max-width in your styles.scss file like so:

    $popover-max-width: 300px;
    
    @import "node_modules/bootstrap/scss/functions";
    @import "node_modules/bootstrap/scss/variables";
    @import "node_modules/bootstrap/scss/mixins";
    @import "node_modules/bootstrap/scss/popover";
    
    

    More on overriding bootstrap 4 defaults https://getbootstrap.com/docs/4.0/getting-started/theming/#variable-defaults

提交回复
热议问题