css 实现一个卡片

html 复制代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 300px;
            height: 400px;
        }

        .code {
            height: 100px;
            width: 360px;
            margin-left: -30px;
            background-color: white;
            clip-path: inset(0 0 0 0 round 0 0 35% 35%);
            margin-bottom: -30px;
            position: relative;
        }
        .inner {
            width: 260px;
            height: 60px;
            background-color: black;
            position: absolute;
            bottom: 0px;
            left: 50px;
        }
        .image {
            height: 130px;
            background-color: blue;
            border-radius:0 0 10px 10px;
        }
    </style>
</head>
<body>
<div class="box">
    <div class="code">
        <div class="inner"></div>
    </div>
    <div class="image"></div>
</div>
</body>
</html>
相关推荐
u***u6852 小时前
React环境
前端·react.js·前端框架
X***E4632 小时前
前端数据分析应用
前端·数据挖掘·数据分析
4***14902 小时前
React社区
前端·react.js·前端框架
LFly_ice2 小时前
学习React-24-路由传参
前端·学习·react.js
Lhuu(重开版3 小时前
CSS:动效布局动画
前端·css
Q***K553 小时前
前端构建工具
前端
laocooon5238578863 小时前
创建了一个带悬停效果的“我的个人主页“按钮
前端
2013编程爱好者4 小时前
Vue工程结构分析
前端·javascript·vue.js·typescript·前端框架
小满zs5 小时前
Next.js第十一章(渲染基础概念)
前端
不羁的fang少年6 小时前
前端常见问题(vue,css,html,js等)
前端·javascript·css