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>
相关推荐
Lee川24 分钟前
深入浅出JavaScript事件机制:从捕获冒泡到事件委托
前端·javascript
光影少年24 分钟前
async/await和Promise的区别?
前端·javascript·掘金·金石计划
恋猫de小郭25 分钟前
Flutter 发布官方 Skills ,Flutter 在 AI 领域再添一助力
android·前端·flutter
心在飞扬26 分钟前
工具调用出错捕获提升程序健壮性
前端·后端
HelloReader26 分钟前
Tauri 命令作用域(Command Scopes)精细化控制你的应用权限
前端
心在飞扬27 分钟前
基于工具调用的智能体设计与实现(*)
前端·后端
心在飞扬28 分钟前
函数调用快速提取结构化数据使用技巧
前端·后端
心在飞扬31 分钟前
不支持函数调用的大语言模型解决技巧
前端·后端
codingWhat31 分钟前
如何实现一个「万能」的通用打印组件?
前端·javascript·vue.js
赵_叶紫1 小时前
聊聊 Agent Skills 这个东西
前端