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>
相关推荐
222you1 分钟前
vue目录文件夹的作用
前端·javascript·vue.js
月屯3 分钟前
pandoc安装与使用(html、makdown转docx、pdf)
前端·pdf·html·pandoc·转docx、pdf
我爱学习_zwj6 分钟前
Node.js模块化入门指南
前端·node.js
Shirley~~8 分钟前
开源项目PPtist分享
前端·typescript·vue
yanghuashuiyue12 分钟前
TypeScript是JavaScript超集-百度AI灵魂拷问
前端·javascript·typescript
光头程序员16 分钟前
Vite 前端项目 - CSS变量智能提示
前端·css
克喵的水银蛇17 分钟前
Flutter 通用下拉选择器:DropdownSelector 一键实现自定义下拉交互
开发语言·javascript·ecmascript
木易 士心18 分钟前
深入理解 TypeScript 声明文件(.d.ts):类型系统的桥梁
前端·javascript·typescript
2401_8604947019 分钟前
在React Native鸿蒙跨平台开发中实现一个基数排序算法,如何进行找到最大数:遍历数组找到最大值呢?
javascript·算法·react native·react.js·排序算法·harmonyos
抹茶冰淇淋19 分钟前
面对新电脑,前端开发者需要进行哪些初始化配置
前端·github