首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

设置一行DIV中的最后一个DIV

div {

display: flex;

justify-content: center;

align-items: center;

height: 100vh;

background-color: #333333;

}

.container {

width: 960px;

margin: 0 auto;

background-color: #ffffff;

padding: 20px 0;

}

.row {

display: flex;

justify-content: space-between;

}

.column {

flex-basis: 48%;

padding: 20px 0;

}

.column h2 {

color: #333333;

font-size: 24px;

font-weight: bold;

margin-bottom: 10px;

}

.column p {

color: #666666;

font-size: 18px;

line-height: 1.5;

margin-bottom: 20px;

}

.column .btn {

display: inline-block;

border-radius: 5px;

background-color: #666666;

color: #ffffff;

font-size: 18px;

font-weight: bold;

padding: 10px 20px;

margin-right: 10px;

}

.column .btn:hover {

background-color: #444444;

}

.column .image-container {

position: relative;

}

.column .image-container img {

width: 100%;

height: 200px;

object-fit: cover;

}

.column .image-container .image-popup {

position: absolute;

top: 0;

left: 0;

width: 100%;

height: 100%;

background-color: rgba(0, 0, 0, 0.5);

display: flex;

justify-content: center;

align-items: center;

font-size: 24px;

color: #ffffff;

transition: 0.3s;

cursor: pointer;

}

.column .image-container .image-popup span {

font-size: 20px;

font-weight: bold;

}

.column .image-container .image-popup:hover {

background-color: rgba(0, 0, 0, 0.8);

}

.column .image-container .image-popup.active {

background-color: rgba(0, 0, 0, 0.8);

}

.column .image-container .image-popup.active span {

font-size: 24px;

font-weight: bold;

}

.column .image-container .image-popup.active:hover {

background-color: rgba(0, 0, 0, 0.5);

}

.column .image-container .image-popup.active:hover span {

font-size: 20px;

font-weight: bold;

}

.column .image-container .image-popup.active:hover:after {

content: "";

position: absolute;

top: 0;

left: 0;

width: 100%;

height: 100%;

background: rgba(0, 0, 0, 0.8);

}

.column .image-container .image-popup.active:after {

content: "";

position: absolute;

top: 0;

left: 0;

width: 100%;

height: 100%;

background: rgba(0, 0, 0, 0.8);

}

.column .image-container .image-popup.active:hover:before {

content: "";

position: absolute;

top: 0;

left: 0;

width: 100%;

height: 100%;

background: rgba(0, 0, 0, 0.5);

页面内容是否对你有帮助?
有帮助
没帮助

相关·内容

  • 行内元素的padding和margin是否无效

    常用块级元素:

    ...

        、、
        、<form>

        02
        领券