CSS卡片样式
<html>
<head>
<meta charset="utf-8">
<title>CSS卡片样式</title>
<style type="text/css">
.card {
position: absolute;
height: 350px;
width: 100%;
max-width: 850px;
margin: auto;
background: #ffffff;
border-radius: 25px;
box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}
.card .inner_part {
display: flex;
align-items: center;
justify-content: center;
padding: 0 0 0 30px;
height: 350px;
position: absolute;
}
.inner_part .img {
height: 260px;
width: 260px;
overflow: hidden;
flex-shrink: 0;
border-radius: 20px;
box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
transform: translateX(-70px);
}
.img img {
height: 100%;
width: 100%;
cursor: pointer;
opacity: 0;
transition: 0.6s;
}
.inner_part .img_1{
opacity: 1;
transition-delay: 0.2s;
object-fit: cover;
}
.content2 {
padding: 0 20px 0 0px;
width: 530px;
margin-left: 50px;
opacity: 0;
transition: 0.6s;
}
.inner_part .content_1{
opacity: 1;
margin-left: -20px;
z-index: 100;
transition-delay: 0.3s;
}
.content2 .title {
font-size: 30px;
font-weight: 700;
color: #0d0925;
margin: 0 0 20px 0;
}
.content2 .text {
font-size: 19px;
color: #4e4a67;
margin: 0 auto 30px auto;
line-height: 1.5em;
text-align: justify;
}
.content2 a {
padding: 15px 20px;
border: none;
font-size: 16px;
color: #fff0e6;
font-weight: 600;
letter-spacing: 1px;
border-radius: 50px;
cursor: pointer;
outline: none;
background: #000000;
box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
float: right;
text-decoration: none;
}
</style>
</head>
<body>
<div class="card">
<div class="inner_part">
<label for="slideImg" class="img">
<img class="img_1" src="https://pic1.58cdn.com.cn/nowater/webim/big/n_v2aa50cd9823954fada892b3e50e56399e.png">
</label>
<div class="content2 content_1">
<span style="margin-bottom: 15px;color: #7b7992;display: block;font-weight: 500;">2018-08-31</span>
<div class="title">美味的端午节粽子和香茶矢量素材</div>
<div class="text">这是一款美味的端午节粽子和香茶矢量素材,提供了 AI 和 EPS 两种格式,含 JPG 预览图。</div>
<a href="https://www.liuzhixi.cn" target="_blank">查看详情</a>
</div>
</div>
</div>
</body>
</html>版权声明:本文由 LzxBlog 发布,如需转载请注明出处。










赞助云储存