html - 给握把中的特定行一个特殊的高度
问题描述
我正在尝试使用 html 和 css 使用网格制作此表单
所有代码都在这里
这是 css 代码,您可以在上面的链接中看到 html 代码
* {
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-o-box-sizing: border-box;
padding: 0;
margin: 0;
}
.container {
padding: 40px;
font-family: 'Lato', sans-serif;
display: grid;
grid-template-columns: repeat(3, calc(100%/3));
grid-template-rows: repeat(3, calc(100%/3));
grid-gap: 15px;
}
.container div {
border-radius: 5px;
color: #fff;
position: relative;
}
.container h3,
.container p {
letter-spacing: 1px;
margin-bottom: 10px;
line-height: 1.5;
}
.container h3 {
text-transform: uppercase;
}
.container a {
color: #fff;
font-weight: bold;
text-decoration: none;
text-transform: uppercase;
padding: 10px;
display: inline-block;
position: absolute;
bottom: -25%;
}
.a-1 {
background-color: #fdc731;
}
.a-2 {
background-color: #f56464;
}
.container img {
width: 100%;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.container .text-container {
padding: 20px;
}
.child-1,
.child-3 {
background-color: #f3b917;
}
.child-1 {
grid-row: 1/ span 2;
}
.child-3 {
grid-row: 1/ span 2;
grid-column: 3;
}
.child-2 {
background-color: #ff4343;
text-align: center;
padding: 75px;
display: flex;
justify-content: center;
align-items: center;
}
.child-2 p {
font-size: 20px;
}
.child-4,
.child-6 {
background-color: #00800085;
text-align: center;
}
.child-5 {
background-color: #fb7878;
grid-row: 2 / span 3;
}
.child-6 {
padding: 40px;
display: flex;
justify-content: center;
align-items: center;
align-self: flex-end;
}
.child-4 {
grid-row: 3 / span 2;
}
问题在于最后一列,我无法像最后一列上方的图片那样将高度与图片相同,知道如何制作吗?
我该如何解决这个问题?
解决方案
推荐阅读
- javascript - 如果语句为真,脚本在块内返回 console.log() 但不返回
- asp.net-core - 登录管理器
.PasswordSignInAsync() 抛出 System.Text.Json 对象循环异常 - clojure - 在 .edn 文件中使用 #inst 将时间戳播种到 clojure 中的 jdbc 数据库
- python - 使用 Pandas 进行事件搜索
- java - java中这两个数组语句的区别
- android - Google 控制台上的 java.lang.RuntimeException
- nativescript - Nativescript RadSideDrawer。我不需要返回按钮
- bash - 将 unix 命令 1 输出到 A 列,将 unix 命令 2 输出到 B 列到相同的 .csv 文件
- snowflake-cloud-data-platform - Snowflake (LEFT JOIN) LATERAL:无法评估不受支持的子查询类型
- javascript - 在Javascript中查找数组最大值