CSS triangle :before element

后端 未结 3 1732
旧时难觅i
旧时难觅i 2021-01-07 17:07

I\'m using bootstrap, trying to make a div have a CSS triangle before it.

http://jsfiddle.net/B2XvZ/11/

Here is my non-working code:

.d:bef         


        
3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-07 17:29

    a:after {
    content: '';
    width: 0px;
    height: 0px;
    border-style: solid;
    border-width: 15px 15px 0px 15px;
    border-color: #fff transparent transparent transparent;
    display: inline-block;
    vertical-align: middle;
    position: absolute;
    bottom: -13px;
    left: 0;
    right: 0;
    margin: 0 auto;
    

    }

提交回复
热议问题