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>
相关推荐
牛奶5 分钟前
为什么敲几个字母就能访问网站?DNS原理大揭秘
前端·http·dns
wuhen_n7 分钟前
破冰——建立我们的AI开发实验环境
前端·javascript
HelloReader11 分钟前
Flutter 自适应布局一套代码适配手机和平板(十二)
前端
牛奶14 分钟前
HTTP裸奔,HTTPS穿盔甲——它们有什么区别?
前端·http·https
梓言16 分钟前
tailwindcss构建执行npm exec tailwindcss init -p 报错
前端
哈罗哈皮17 分钟前
龙虾(openclaw)本地快速安装及使用教程
前端·aigc·ai编程
用户231154445305818 分钟前
React中实现“双向绑定”效果的几种方式
前端
HelloReader19 分钟前
Flutter Sliver 高级滚动打造 iOS 通讯录体验(十三)
前端
a1117761 小时前
程序化几何背景生成器(html 开源)
前端·开源·html
浮笙若有梦1 小时前
我开源了一个比 Ant Design Table 更好用的高性能虚拟表格
前端·vue.js