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>
相关推荐
漂流瓶jz20 小时前
总结CSS组件化演进之路:命名规范/CSS Modules/CSS in JS/原子化CSS
前端·javascript·css
踩着两条虫20 小时前
「AI + 低代码」的可视化设计器
开发语言·前端·低代码·设计模式·架构
Jagger_21 小时前
项目上线忙碌结束之后,为什么总想找点事做?
前端
GalenZhang88821 小时前
OpenClaw 配置多个飞书账号实战指南
前端·chrome·飞书·openclaw
steven~~~1 天前
为什么mq报错
javascript
萌新小码农‍1 天前
python装饰器
开发语言·前端·python
threelab1 天前
Three.js 初中数学函数可视化 | 三维可视化 / AI 提示词
开发语言·前端·javascript·人工智能·3d·着色器
爱学习的程序媛1 天前
浏览器工作原理全景解析
前端·浏览器·web
凉辰1 天前
解决 H5 键盘遮挡与页面上推
开发语言·javascript·计算机外设
我是若尘1 天前
用 Git Worktree 同时开多个需求,不用来回 stash
前端