这段代码昨天工作了,现在突然停止工作了,我没有对我的任何html页面进行任何改动,包括该页面。我正在使用烧瓶引导程序,但我的导航栏工作正常,并且出现了“列表组项目”的边框,只是“列表组项目成功/信息/警告”中缺少的颜色。

<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>


css -  bootstrap 列表组元素颜色不起作用-LMLPHP

最佳答案

<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标签内。锚点不能在相关问题的UL标签内。

关于css - bootstrap 列表组元素颜色不起作用,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/39949659/

10-12 16:24