Bootstrap Border位于顶部(右上方)底部边框

时间:2017-02-22 21:57:35

标签: css twitter-bootstrap-3

如何在边框顶部放置边框?我的标题的一部分是横幅,另一部分是带有与横幅混合的底部边框的文本。有一种颜色不同,我想在我创建的边框顶部制作1px实线。是否可以在边框顶部放置边框?

<div class="navbar navbar-default mega-menu" role="navigation">
                <div class="container">
                    <!-- Brand and toggle get grouped for better mobile display -->
                    <div class="navbar-header">
                        <div class="row">
                            <div class="col-md-10">
                                <a href="#"><img id="logo-header" class="header-banner img-responsive" src="assets/img/ptaximg/topgraphicptax.jpg" width="1000" alt=""></a>
                            </div>
                           <div id="border" class="col-md-2">
                                <!--<a class="navbar-brand" href="index.html">
                                    <img src="assets/img/ptaximg/ptax-logo_sm.jpg" alt="Logo">-->
                                <a class="navbar-brand" href="http://www.pacificbluesoftware.com/">
                                    <img src="assets/img/ptaximg/ptax-logo_sm.jpg">
                                    <p class="powered_by text-center">Powered by</p>
                                    <p class="powered_by text-center"><strong>Pacific Blue Software, Inc.</strong></p>
                                </a>
                            </div>
                        </div>
                        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
                            <span class="full-width-menu">Menu Bar</span>
                            <span class="icon-toggle">
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                            </span>
                        </button>
                    </div>
                </div>

#border{
    border-bottom: solid 27px #296488;
    margin-left: -15px;
}

我试图将1px边框放在此边框正上方我创建了border-bottom:solid 27px#296488;

1 个答案:

答案 0 :(得分:1)

您可以使用box-shadow创建一个双边框,如下所示:

#border{
    border-bottom: solid 27px #296488;
    box-shadow: inset 0 -10px 1px -10px red;
}