当前位置:首页 > 技术博客 > CSS > CSS卡片样式

CSS卡片样式

5年前 (2021-10-05)CSS1134

<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 发布,如需转载请注明出处。

本文链接:https://www.liuzhixi.cn/html/176.html

标签: CSS

相关文章

动态的选项卡图标栏svg特效

动态的选项卡图标栏svg特效

使用js css3 svg制作的选项卡图标栏切换特效,点击图标高亮动画切换效果。这是一款可自适应网页的矢量选项卡图标栏代码。body { &nb...

夜晚云层动画特效

夜晚云层动画特效

基于css3 keyframes 属性制作乌云密布云层动画,夜晚云层飘过动画特效。可用于网页动态云层背景特效。这是利用animation 和png云图片制作完成...

炫酷的登录注册表单切换代码

炫酷的登录注册表单切换代码

基于CSS3属性制作创意的登录注册表单样式,酷炫的登录/注册表单ui特效。下载链接: https://pan.baidu.com/s/1hhpCnROFc0gT...

CSS原子环绕标志动画

CSS原子环绕标志动画

CSS原子环绕标志动画<head> <meta charset="UTF-8"> <meta...

糖果风格的动画按钮

糖果风格的动画按钮

这是一款糖果风格的动画按钮,共 16 个,每个按钮都有不同的渐变色和动画形式。<!DOCTYPE html>  &nb...

深色系发光魔法卡图片特效

深色系发光魔法卡图片特效

<!DOCTYPE html>     <html>  &nbs...

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。