简单编程爱心代码,简单能自己编写的爱心代码

首页 > 实用技巧 > 作者:YD1662024-02-03 05:46:56

1. HTML爱心代码:

```

<span style="color: red; font-size: 50px;">&hearts;</span>

```

2. CSS爱心代码:

```

.heart {

height: 50px;

width: 50px;

background-color: red;

position: relative;

transform: rotate(45deg);

margin-left: 20px;

}

.heart::before, .heart::after {

content: "";

height: 50px;

width: 50px;

background-color: red;

position: absolute;

}

.heart::before {

top: -25px;

border-radius: 25px 25px 0 0;

}

.heart::after {

left: -25px;

border-radius: 25px 0 0 25px;

}

```

3. JavaScript爱心代码:

```

console.log("\

╭┳╮ \n\

│ │ \n\

│ └─╮ \n\

╰───┐ \n\

│ \n\

╰┬╯")

```

栏目热文

文档排行

本站推荐

Copyright © 2018 - 2021 www.yd166.com., All Rights Reserved.