正方形作为评级栏

时间:2016-01-11 19:40:39

标签: html5 css3

我正在寻找一些帮助,试图为评级栏创建方格,但我对从哪里开始有点困惑。我添加了一张我希望它们看起来像什么的图像

1 个答案:

答案 0 :(得分:2)



.Square {
    width: .5%;
    border: 2px solid #00316A;
    float:left;
    height: 30px;
}

.MarginRight {
    margin-right: 1%;
}

.Fill {
    background-color: #00316A;
}

<!DOCTYPE html>
<html>
  <head>
    <style>
    </style>
  </head>
  <body>
    <div class="wrapper">
      <div class="Square MarginRight Fill"></div>
      <div class="Square MarginRight Fill"></div>
      <div class="Square MarginRight Fill"></div>
      <div class="Square MarginRight Fill"></div>
      <div class="Square MarginRight Fill"></div>
      <div class="Square MarginRight Fill"></div>
      <div class="Square MarginRight Fill"></div>
      <div class="Square MarginRight"></div>
      <div class="Square MarginRight"></div>
      <div class="Square MarginRight"></div> 
    </div>
  </body>
</html>
&#13;
&#13;
&#13;