html 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>
          /* 爱心 */
          .love {
            position: relative;
            top: 100px;
            left: 100px;
            width: 60px;
            height: 60px;
            background-color: tomato;
            transform: rotate(-45deg);
        }
        .love:before {
            content: "";
            position: absolute;
            top: -30px;
            left: 0;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background-color: tomato;
        }
        
        .love:after {
            content: "";
            position: absolute;
            top: 0px;
            left: 30px;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background-color: tomato;
        }
    </style>
</head>
<body>
    <div class="love"></div>
</body>
</html>
相关推荐
Highcharts.js7 分钟前
Highcharts 纯 JavaScript 图表库深度使用评测
开发语言·前端·javascript·功能测试·ecmascript·highcharts·技术评测
码码哈哈0.017 分钟前
基于 RSA 非对称加密与挑战码机制的前端登录安全方案
前端·安全·状态模式
ZC跨境爬虫21 分钟前
跟着 MDN 学 HTML day_39:(DOMException 异常接口完全解析)
前端·javascript·html·媒体
渐儿43 分钟前
NestJS 教程 Part 2 — 数据层、API 设计与业务异步
前端
渐儿1 小时前
Next.js 教程 Part 2 — 数据获取、Server Actions 与状态
前端
用户125758524361 小时前
XYGo Admin ArtTable 表格组件:一行代码搞定加载、刷新与分页
前端
gogoing1 小时前
Prettier 配置说明
前端·javascript
十有八七1 小时前
Hermes Agent 自进化实现:从源码到架构的深度拆解
前端·人工智能
渐儿1 小时前
NestJS 生产级开发教程
前端