如何摆脱这些图像上的额外填充?

时间:2017-04-02 02:19:30

标签: html css

我一直试图制作一个小游戏,但我遇到了错误。



body{
  font-family: 'Raleway', sans-serif;
  margin: 0;
}

#title{
  text-align: center;
  font-size: 96px;
  margin-bottom: 5px;
}

.boardpic{
  margin: 0;
  padding: 0;
  width: 32px;
  height: 32px;
}

#board{
  background-color: black;
  padding: 3px;
  width: 512px;
  height: 512px;
}

<html>
  <head>
    <title>
      Drawify | 0.0.1
    </title>
    <link rel="stylesheet" type="text/css" href="styles.css">
    <link href="https://fonts.googleapis.com/css?family=Raleway:700" rel="stylesheet">
  </head>
  <body>
    <h1 id="title">
      Drawify
    </h1>
    <div id="container">
      <div id="board">
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
      </div>
      <div id="colorpicker">
      </div>
    </div>
    <script src="code.js">
    </script>
  </body>
</html>
&#13;
&#13;
&#13;

正如你在上面看到的那样,图像仍然有填充,即使我将它们的边距和填充设置为0.(我只是意识到图像不会像本地一样加载。它只是一个32x32图像白色。)

lel

2 个答案:

答案 0 :(得分:2)

快速技巧

在棋盘上设置font-size:0

#board{
  background-color: black;
  padding: 3px;
  width: 512px;
  height: 512px;
  font-size:0
} 

代码段

body{
  font-family: 'Raleway', sans-serif;
  margin: 0;
}

#title{
  text-align: center;
  font-size: 96px;
  margin-bottom: 5px;
}

.boardpic{
  margin: 0;
  padding: 0;
  width: 32px;
  height: 32px;
}

#board{
  background-color: black;
  padding: 3px;
  width: 512px;
  height: 512px;
  font-size:0;
}
<html>
  <head>
    <title>
      Drawify | 0.0.1
    </title>
    <link rel="stylesheet" type="text/css" href="styles.css">
    <link href="https://fonts.googleapis.com/css?family=Raleway:700" rel="stylesheet">
  </head>
  <body>
    <h1 id="title">
      Drawify
    </h1>
    <div id="container">
      <div id="board">
        <div class="line">
          <img class="boardpic" src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSzQljZiYwAlULvViQAWNnBaIz4r_61X09p2lcgZCTVrEBN4Rot" />
  <img class="boardpic" src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSzQljZiYwAlULvViQAWNnBaIz4r_61X09p2lcgZCTVrEBN4Rot" />
            <img class="boardpic" src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSzQljZiYwAlULvViQAWNnBaIz4r_61X09p2lcgZCTVrEBN4Rot" />
            <img class="boardpic" src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSzQljZiYwAlULvViQAWNnBaIz4r_61X09p2lcgZCTVrEBN4Rot" />
            <img class="boardpic" src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSzQljZiYwAlULvViQAWNnBaIz4r_61X09p2lcgZCTVrEBN4Rot" />
            <img class="boardpic" src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSzQljZiYwAlULvViQAWNnBaIz4r_61X09p2lcgZCTVrEBN4Rot" />
            <img class="boardpic" src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSzQljZiYwAlULvViQAWNnBaIz4r_61X09p2lcgZCTVrEBN4Rot" />
            <img class="boardpic" src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSzQljZiYwAlULvViQAWNnBaIz4r_61X09p2lcgZCTVrEBN4Rot" />
            <img class="boardpic" src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSzQljZiYwAlULvViQAWNnBaIz4r_61X09p2lcgZCTVrEBN4Rot" />
            <img class="boardpic" src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSzQljZiYwAlULvViQAWNnBaIz4r_61X09p2lcgZCTVrEBN4Rot" />
            <img class="boardpic" src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSzQljZiYwAlULvViQAWNnBaIz4r_61X09p2lcgZCTVrEBN4Rot" />
  <img class="boardpic" src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSzQljZiYwAlULvViQAWNnBaIz4r_61X09p2lcgZCTVrEBN4Rot" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
        <div class="line">
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
          <img class="boardpic" src="images/white.png" />
        </div>
      </div>
      <div id="colorpicker">
      </div>
    </div>
    <script src="code.js">
    </script>
  </body>
</html>

答案 1 :(得分:0)

使用for (auto& x : v) { x++; cout << x << endl; } 。最好在你的CSS中使用float property来使白色空间消失。请试试

float:right