How to change the bootstrap caret pointing position?

僤鯓⒐⒋嵵緔 提交于 2019-12-02 05:37:12

After some discussion with a friend, we came up with adding this class:

.btn.collapsed > .caret {border-left: 4px solid #888; border-right: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent;}

Though we weren't able so solve the # from being added to the end of the URL. If anyone knows of a suggestion, that would be great.

Simple:

<span class="dropup">
    <span class="caret"></span>
</span>
  1. If your element starts out collapsed, make sure to add the class explicitly

    <a class="btn dropdown-toggle fleft collapsed" data-toggle="collapse" data-target="#demo-1" href="#"><span class="caret"></span></a>
    
  2. Use this CSS

    // open state - points up
    .functionbox .caret {
      border-top-width: 0;
      border-bottom-width: 5px;
      border-bottom-style: solid;
    }
    
    // collapsed state - points down
    .functionbox .collapsed .caret {
      border-top-width: 5px;
      border-bottom-width: 0;
    }
    
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!