如何在html和css上创建此块?[关闭]

thigvfpy  于 5个月前  发布在  其他
关注(0)|答案(1)|浏览(48)

**已关闭。**此问题需要debugging details。目前不接受回答。

编辑问题以包括desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem。这将帮助其他人回答问题。
14天前关门了。
Improve this question


的数据
这个积木怎么做?我不知道怎么做最后的灰色背景。

9ceoxa92

9ceoxa921#

你可以尝试这样的东西:

.outer {
  max-width: 1024px;
  width: 100%;
  margin: 0 auto;
}

.inner {
  max-width: 300px;
  float: left;
}

.inner h2 {
  font-size: 36px;
}

.inner h2 span {
  color: #ea7866;
}

.inner p {
  font-size: 13px;
  font-family: Arial, sans-serif;
  color: gray;
  text-align: justify;
}

.inner button {
  font-family: Times, serif;
  color: white;
  background: #ea7866;
  border: 0;
  padding: 10px;
}

.wrap {
  max-width: 980px;
  width: 100%;
  text-align: center;
  padding-top: 20px;
}

.wrap span {
  position: absolute;
  left: 20px;
  color: white;
  z-index: 10;
  top: 200px;
  font-weight: bold;
}

.city-container {
  text-align: center;
  width: 195px;
  height: 235px;
  position: relative;
  display: inline-grid;
  margin: 10px;
}

.city-container img {
  width: 195px;
  height: 235px;
  z-index: 1;
  position: relative;
  top: -235px;
}

.city-container:before {
  width: 195px;
  height: 235px;
  background: linear-gradient(6deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
  position: relative;
  left: 0px;
  top: 0px;
  bottom: 0;
  right: 0;
  content: '';
  display: inline-block;
  z-index: 9;
}

@media (min-width: 1024px) {
  .wrap:before {
    content: '';
    width: 41%;
    height: 310px;
    position: absolute;
    background: #f6f6f6;
    right: 0;
    top: 5px;
  }
}

个字符

相关问题