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>
相关推荐
Dxy12393102162 分钟前
Python设置Excel表格边框样式:从基础到高级
前端·python·excel
布列瑟农的星空13 分钟前
tree shaking为什么失效
前端
米丘16 分钟前
vue3.5.x 单文件组件(SFC)样式编译过程
css·vue.js·postcss
idcu21 分钟前
加入 Lyt.js:从第一行代码到核心贡献者
前端
最炫的美少女战士23 分钟前
claude code 安装报错claude native binary not installed.
javascript
肥羊zzz24 分钟前
Vue2 vs Vue3 中 v-for 的 key 用法对比
前端·vue.js
dsyyyyy11011 小时前
HTML总结
前端·html
用户2367829801681 小时前
Canvas:实现一个高颜值二维码生成器
javascript
剑神一笑1 小时前
从字符串到时间线:实现一个 Cron 表达式解析器
javascript·typescript·reactjs
前端那点事2 小时前
深度解析:Vue中computed的实现原理(易懂不晦涩)
前端·vue.js