div+css实现卡片堆叠文字布局效果代码
代码语言:html
所属分类:布局界面
代码描述:div+css实现卡片堆叠文字布局效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Nunito&display=swap'>
<style>
:root {
--accent: #c7ecee;
--accentComplimentary: #7ed6df;
}
* {
box-sizing: border-box;
}
body {
font: 400 100%/1 "Nunito", serif;
background-color: #f7f1e3;
color: #2f3640;
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, 350px);
gap: 35px;
padding: 60px 35px;
justify-content: center;
}
.card {
border-radius: 35px;
overflow: hidden;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
min-height: 500px;
}
.card__top {
position: relative;
background-color: var(--accentComplimentary);
padding: 35px 35px 70px 35px;
z-index: 0;
display: flex;
align-items: flex-start;
}
.card__top:has(.card__figure) {
aspect-ratio: 3/2;
}
.card__bottom {
position: relative;
margin-top: -35px;
background-color: var(--accent);
padding: 35px;
border-radius: 35px;
display: flex;
gap: 60px;
flex-direction: column;
justify-content: space-between;
flex-grow: 1;
z-index: 1;
}
.card__figure {
position: absolute;
inset: 0;
mix-blend-mode: lighten;
opacity: 0.5;
}
.ca.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0