How is the caret on Twitter Bootstrap constructed?

后端 未结 2 493
没有蜡笔的小新
没有蜡笔的小新 2021-02-04 08:06

This is more of a curiosity question than something I really need to know.

On this page:

http://twitter.github.com/bootstrap/components.html#buttonDropdowns

2条回答
  •  暖寄归人
    2021-02-04 08:28

    Here is the CSS for an upward facing caret, based on the CSS from bootstrap:

    .caret-up {
      display: inline-block;
      width: 0px;
      height: 0px;
      margin-left: 2px;
      vertical-align: middle;
      border-top: none;
      border-bottom: 4px solid #FFFFFF;
      border-right: 4px solid transparent;
      border-left: 4px solid transparent;
      border-top-width: 0px;
      border-top-style: dotted;
      content: "";
    }
    

提交回复
热议问题