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>
相关推荐
Struggler281几秒前
SSE的使用
前端
用户5806139393007 分钟前
前端文件下载实现深度解析:Blob与ObjectURL的完美协作
前端
Lin866610 分钟前
Vue 3 + TypeScript 组件类型推断失败问题完整解决方案
前端
coding随想10 分钟前
从零开始:前端开发者的SEO优化入门与实战
前端
前端工作日常13 分钟前
我理解的JSBridge
前端
Au_ust13 分钟前
前端模块化
前端
顺丰同城前端技术团队13 分钟前
还不会用 Charles?最后一遍了啊!
前端
BUG收容所所长15 分钟前
二分查找的「左右为难」:如何优雅地找到数组中元素的首尾位置
前端·javascript·算法
彬师傅15 分钟前
geojson、csv、json 数据加载
前端
用户527096487449015 分钟前
🔥 我与 ESLint 的爱恨纠葛:从"这破玩意儿"到"真香警告"
前端