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

CSS卡片样式

4年前 (2021-10-05)CSS950

<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

相关文章

css3悬停卡片3D翻转动画特效

css3悬停卡片3D翻转动画特效

css3卡片和文字翻转切换效果,制作悬停卡片3D翻转特效。<style>     *, *:be...

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

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

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

纯css loading

纯css loading

页面加载loading沙漏动画特效<html> <head> <style> .container {...

糖果风格的动画按钮

糖果风格的动画按钮

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

很有意境的日式字体背景

很有意境的日式字体背景

日式风格的字体背景,颜色很漂亮,很有意境,很多小伙伴都在苦苦寻觅,今天它来啦,具体效果可以打开预览查看,个人非常喜欢,小编也是费了好大力气才找到的。<ht...

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

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

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

发表评论

访客

看不清,换一张

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