Bootstrap popover width for popover-inner

前端 未结 10 1465
攒了一身酷
攒了一身酷 2020-12-29 18:48

I would like the have a Bootstrap Popover be wider. I read that this should work:

.popover-inner a {
   width: 600px;
}

But, the browser c

10条回答
  •  一生所求
    2020-12-29 19:37

    Here's a sample initialization that I use.

        $(".property-price")
        .popover({ 
                trigger: "hover", 
                placement: 'bottom',
                toggle : "popover",
                content : "The from price is calculated ba....the dates selected.",
                title: "How is the from price calculated?",
                container: 'body',
                template: '

    ', });

    As you can see, it uses a custom template. The template uses a custom popover-medium class.

    I then have a CSS selector

    .popover-medium {
        max-width: 350px;
    }
    

    You could also just set a style on the template class if you wanted.

提交回复
热议问题