CSS Div不想出现我做的任何事情

时间:2016-01-13 20:26:26

标签: html css

我有一个网站的简单部分,我使用一些CSS来获得方形瓷砖。问题是整个磁贴从未真正显示出来,当我在HTML中使用它并在其中放入大量文本时,宽度和高度属性似乎对div没有任何影响。这里

`



.tileYellowDouble {
  display: inline-block;
  background-color: Black;
  height: 200px;
  width: 400px;
  border: solid 1px black;
}
#imageTile {
  float: right;
  display: inline-block;
  background: url(Thimo.png);
  background-size: 100% 100%;
  width: 400px;
  height: 600px;
  border-radius: 0px 10px 10px 0px;
}
body {
  background: url(York.jpg) no-repeat center center fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}
.main {
  position: fixed;
  border: solid 1px black;
  top: 50%;
  left: 50%;
  margin-top: -300px;
  margin-left: -500px;
  width: 1000px;
  height: 600px;
  background: #35bc7a;
  border-radius: 10px;
}

<div class="main">
  <div id="imageTile"></div>
  <div class="tileYellowDouble">Doesnt show the background color or border</div>
</div>
&#13;
&#13;
&#13;

我刚刚发现当我评论出来时.main确实会显示该框,但是当它重新进入时它只显示一个清晰的背景。使用Z-index也不起作用

0 个答案:

没有答案