CSS实现图片缺角效果

news/2025/2/25 21:39:52
htmledit_views">

效果:

源码: 

html"><!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>123</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            background: #f9f9f9;
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100vh;
        }

        .row {
            display: flex;
            padding: 30px;
            gap: 30px;
            flex-wrap: wrap;
            background: inherit;
        }

        .box {
            position: relative;
            width: 500px;
            height: 250px;
            border-radius: 20px;
            background-color: inherit;
        }

        .btn {
            display: inline-flex;
            padding: 12px 20px;
            justify-content: center;
            align-items: center;
            color: white;
            text-decoration: none;
            background-color: #000521;
            border-radius: 80px;
        }

        .btn-decor-wrap {
            position: absolute;
            left: 0;
            bottom: 0;
            display: inline-block;
            padding: 24px 24px 0 0;
            margin: 24px 24px 0 0;
            border-top-right-radius: 45px;
            background-color: inherit;
        }

        .btn-decor-wrap:after,
        .btn-decor-wrap:before {
            z-index: 0;
            position: absolute;
            display: block;
            width: 24px;
            height: 24px;
            content: '';
            clip-path: polygon(0.082%0%, 0%0%, 0%100%, 100%100%, 100%99.918%, 100%99.918%, 84.085%98.066%, 68.994%93.913%, 54.912%87.642%, 42.022%79.44%, 30.51%69.49%, 20.56%57.978%, 12.358%45.088%, 6.088%31.006%, 1.934%15.915%, 0.082%0%);
            background-color: inherit;
            overflow: hidden;
        }

        .btn-decor-wrap:before {
            top: -24px;
            left: 0;
        }

        .btn-decor-wrap:after {
            right: -24px;
            bottom: 0;
        }
    </style>
</head>

<body>
    <div class="row">
        <div class="box" style="background-image: url('https://img-home.csdnimg.cn/images/20250224104257.png');background-size: cover;background-position: center;">
            <span class="btn-decor-wrap">
                <a href="#" class="btn">了解更多</a>
            </span>
        </div>
    </div>
</body>

</html>


http://www.niftyadmin.cn/n/5865965.html

相关文章

力扣2382. 删除操作后的最大子段和

力扣2382. 删除操作后的最大子段和 题目 题目解析及思路 题目要求找到每次删除一个元素的最大字段和 因为删除不好做&#xff0c;可以转删除为添加&#xff0c;用并查集维护当前子段和 两部分合并(两个并查集)&#xff0c;三部分求和(两个并查集和一个元素) 代码 class S…

【对话推荐系统】Towards Topic-Guided Conversational Recommender System 论文阅读

Towards Topic-Guided Conversational Recommender System 论文阅读 Abstract1 Introduction2 Related Work2.1 Conversation System2.2 Conversational Recommender System2.3 Dataset for Conversational Recommendation 3 Dataset Construction3.1 Collecting Movies for Re…

SpringBoot两种方式接入DeepSeek

方式一&#xff1a;基于HttpClient 步骤 1&#xff1a;准备工作 获取 DeepSeek API 密钥&#xff1a;访问 DeepSeek 的开发者平台&#xff0c;注册并获取 API 密钥。 步骤 2&#xff1a;引入依赖 <dependency><groupId>org.springframework.boot</groupId&g…

20250212:https通信

1:防止DNS劫持:使用 https 进行通信。 因为是SDK授权开发,需要尽量压缩so库文件和三方依赖。所以第一想法是使用 head only 的 cpp-httplib 进行开发。 cpp-httplib 需要 SSL 版本是 3.0及以上。但本地已经在开发使用的是1.0.2a版本,不满足需求。 方案1:升级OpenSSL 将Op…

Lab14_ Blind SQL injection with time delays

文章目录 前言&#xff1a;进入实验室构造 payload 前言&#xff1a; 实验室标题为&#xff1a; 带有时间延迟的 SQL 盲注 等级&#xff1a;执业者 简介&#xff1a; 本实验室包含一个盲 SQL 注入漏洞。应用程序使用跟踪 cookie 进行分析&#xff0c;并执行包含已提交 coo…

hot100-二叉树

二叉树 二叉树递归 相当于这个的顺序来回调换 class Solution {private List<Integer> res new ArrayList<>();public List<Integer> inorderTraversal(TreeNode root) {if(root null)return res;inorderTraversal(root.left);res.add(root.val);inorde…

第十三:路由两个注意点:

4.3. 【两个注意点】 路由组件通常存放在pages 或 views文件夹&#xff0c;一般组件通常存放在components文件夹。 通过点击导航&#xff0c;视觉效果上“消失” 了的路由组件&#xff0c;默认是被卸载掉的&#xff0c;需要的时候再去挂载。 <script setup lang"ts&q…

Figure自研模型Helix发布,人形机器人迈向新纪元?

Figure 公司自 2022 年成立以来&#xff0c;便在人形机器人领域崭露头角&#xff0c;成为行业内备受瞩目的新星。公司由连续创业者 Brett Adcock 创立&#xff0c;总部位于美国加利福尼亚州桑尼维尔&#xff0c;汇聚了来自波士顿动力公司、特斯拉、谷歌 DeepMind 等知名企业的顶…