【问题标题】:Replace the arrow with a Line in bootstrap popover在引导弹出窗口中用 Line 替换箭头
【发布时间】:2017-09-14 21:29:11
【问题描述】:

JSFIDDLE

我得到了这个 Bootstrap 弹出框,但我必须将箭头修改为水平线。这适用于弹出框的左侧和右侧。

这是我要修改的内容的屏幕截图:

我相信会有很多 CSS 更改,但不知道从哪里开始。

HTML:

<div class="container">
<a href="#" title="Header" data-toggle="popover" data-trigger="hover" data-placement="left" data-content="Some content">Hover Left</a> | 
<a href="#" title="Header" data-toggle="popover" data-trigger="hover" data-placement="right" data-content="Some content">Hover Right</a>
</div>

CSS:

.container {
    text-align: center;
    margin: 20% auto;
    width: 100%;
}

JS:

$(document).ready(function(){
    $('[data-toggle="popover"]').popover();   
});

【问题讨论】:

    标签: jquery twitter-bootstrap css css-transitions


    【解决方案1】:

    我创建了带有线条边框的左侧弹出框。希望您可以创建正确的弹出框。将下面的 css 代码添加到您的 .css 文件中

    .container {
    text-align: center;
    margin: 20% auto;
    width: 100%;
    }
    .popover.left{
     margin-left: -30px
    }
    
    .popover .arrow{
      border-width: 1px;
    }
    .popover.left .arrow:after {
    right: -20px;
    bottom: -12px;
    }
    .popover .arrow:after {
    border-width: 0px;
    content: "";
    width: 30px;
    height: 1px;
    background-color: #ccc;
    }
    

    【讨论】:

    • 超级棒!谢谢你。我会重新创建其他的:)
    • 不客气 :)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-03-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多