<!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>