Bootstraps list-group-item颜色不起作用

时间:2016-10-09 23:43:41

标签: css twitter-bootstrap flask-bootstrap

这段代码昨天正在运行,现在突然停止工作了,我没有对我的任何html页面进行任何改动,包括这个。我正在使用烧瓶引导程序,但我的导航栏工作正常,出现“list-group-item”的边框就在那里,它只是“list-group-item-success / info / warning”中缺少的颜色。

<div class="col-md-8">
      <ul class="list-group">
         <a href="{{ url_for('listings.make_bst_listing') }}">
          <li class="list-group-item list-group-item-success">
           <h4><b>Buy Sell Trade</b> </h4>
            <p>Post a listing for an item that you want to buy and/or sell and/or trade</p>
           </li>

enter image description here

1 个答案:

答案 0 :(得分:0)

<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>


<!--This code was working yesterday and now it has suddenly stopped working, I haven't made any alterations to any of my html pages including this one. I am using flask bootstrap but my navbar is working fine and the border that comes up with "list-group-item" is there, it's just the colours that are missing from "list-group-item-success/info/warning".-->

<div class="col-md-8">
  <ul class="list-group">
    <li class="list-group-item list-group-item-danger">
      <a href="{{ url_for('listings.make_bst_listing') }}">
        <h4><b>Buy Sell Trade</b> </h4>
        <p>Post a listing for an item that you want to buy and/or sell and/or trade</p>
      </a>
    </li>  
  </ul>
</div>

这对我有用......但是html被重新排列,因此Anchor标签位于LI标签内。锚点不能位于已发布的U​​L标记内。