Firefox打破可折叠列表

时间:2016-10-13 00:18:01

标签: css firefox

我有一个可折叠的列表,在Chrome中运行得非常好,但是当我打开FireFox并查看它时,它看起来都很糟糕。我打开了调试器,没有声明错误,有什么我想念的吗?

(暂不发布图片!)

它在Firefox中的外观 - >

http://i.imgur.com/SbcTnGU.png

它在Chrome中的外观 - >

http://i.imgur.com/ofYp755.png

.collapsibleList li>input+* {
  display: none
}
.collapsibleList li>input:checked+* {
  display: block
}
.collapsibleList li>input {
  display: none
}
.collapsibleList li list-group-item>.badge {
  float: right
}
.collapsibleList label {
  position: relative;
  display: block;
  padding: 10px 15px;
  margin-bottom: 0px;
  background-color: #fff;
  border: 1px solid #ddd;
  cursor: pointer
}

1 个答案:

答案 0 :(得分:-1)

将Firefox 49与下面的代码段一起使用,您上面粘贴的代码可以完美地完成一些小的HTML解析调整。

<html data-ember-extension="1" class="fa-events-icons-ready" lang="en"><head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <title>Bootstrap 101 Template</title>

    <!-- Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  <link href="https://use.fontawesome.com/b703330c8c.css" media="all" rel="stylesheet"></head>
  <body>

    <style>
        .collapsibleList li>input+* {
          display: none
        }
        .collapsibleList li>input:checked+* {
          display: block
        }
        .collapsibleList li>input {
          display: none
        }
        .collapsibleList li list-group-item>.badge {
          float: right
        }
        .collapsibleList label {
          position: relative;
          display: block;
          padding: 10px 15px;
          margin-bottom: 0px;
          background-color: #fff;
          border: 1px solid #ddd;
          cursor: pointer
        }
    </style>

    <h1>Hello, world!</h1>

    <ul class="collapsibleList">

      <li><label class="list-group-item" for="mylist-node6">Highest Win Ratio<span class="badge">Click Me!</span></label>

        <input id="mylist-node6" type="checkbox">


        <ul>
          <li class="list-group-item">
              <img src="avatar”"> #1 <a href=""> Name</a> <span class="badge">61.76% </span>
          </li>
          <li class="list-group-item">
            <img src="avatar"> #2 <a href=""> Name</a> <span class="badge">50.75% </span>
          </li>
          <li class="list-group-item">
              <img src="avatar"> #3 <a href=" "> Name</a> <span class="badge"> 44.59%</span>
          </li>
        </ul>
      </li>
      <li class="list-group-item ">
          <a href=""><i class="fa fa-gamepad"></i> ClassicHG Leaderboards</a>
       </li>
  </ul>



    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
  <script src="https://use.fontawesome.com/b703330c8c.js"></script>

</body></html>