3D旋转跳动爱心代码html(3d旋转爱心表情包)

http://www.itjxue.com  2023-02-27 20:39  来源:未知  点击次数: 

跳动爱心代码html为什么不能用

网络的问题。跳动爱心代码html不能用多数是网络连接异常导致。

1、首先打开电脑检查网络。

2、其次打开html进行测试网络连接是否异常。

3、最后等待网络连接正常后,点击html重新进入即可启动跳动爱心代码。

在电脑上用代码弄爱心

在电脑上用代码弄爱心方法如下:

1、打开运行电脑中安装的dreamware软件,打开“文件”菜单中的“新建”功能,创建一个新的HTML文件。

2、在body标签中加入如下的html代码,设置显示爱心的对象。

3、在head标签中添加css样式标签<style,并写入CSS样式,把爱心的对象变成红色的方块。

4、给这个元素设置伪元素CSS样式。

5、这个爱心的一半就出来了,再给它进行一下角度的45度旋转。

6、接下来只需要再添加另外一边的爱心,再把两个叠加在一起就完成了。

用html加css做一个心脏跳动的页面的代码

!DOCTYPE html

html

head

meta charset="UTF-8"

titleHTML5爱心跳动动画DEMO演示/title

style

@import url();

@import url();

body {

background-color: #ccc;

}

.container {

width: 512px;

height: 380px;

margin: auto;

margin-top: 0;

}

.heart {

z-index: 1;

width: 150px;

height: 150px;

position: absolute;

top: 50%;

margin-top: -75px;

left: 50%;

margin-left: -75px;

background-size: 100%;

background-repeat: no-repeat;

background-image:url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjE3M3B4IiBoZWlnaHQ9IjE1OHB4IiB2aWV3Qm94PSIwIDAgMTczIDE1OCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTczIDE1OCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBmaWxsPSIjRUY0NjU3IiBkPSJNMTU3LjMzMSwxNS41MDRjLTE5LjU1OS0xOS41NTktNTEuMjcxLTE5LjU1OS03MC44MzEsMGMtMTkuNTU5LTE5LjU1OS01MS4yNzEtMTkuNTU5LTcwLjgzMSwwDQoJYy0xOS41NTksMTkuNTU5LTE5LjU1OSw1MS4yNzEsMCw3MC44MzFsNzAuODMxLDcwLjgzbDcwLjgzMS03MC44M0MxNzYuODksNjYuNzc1LDE3Ni44OSwzNS4wNjQsMTU3LjMzMSwxNS41MDR6Ii8+DQo8L3N2Zz4=");

}

.hometown {

font-family:'Inconsolata', sans-serif;

font-weight: bold;

font-size: 2.0em;

text-transform: uppercase;

position: relative;

z-index: 1;

width: 512px;

height: 512px;

color: #FFF;

}

#top {

width: 200px;

margin: auto;

position: relative;

}

#top span {

height: 350px;

position: absolute;

width: 20px;

left: 50%;

margin-left: -10px;

top: 110px;

}

.char1 {

transform: rotate(-36deg);

}

.char2 {

transform: rotate(-24deg);

}

.char3 {

transform: rotate(-12deg);

}

.char4 {

transform: rotate(0deg);

}

.char5 {

transform: rotate(12deg);

}

.char6 {

transform: rotate(24deg);

}

.char7 {

transform: rotate(36deg);

}

#bottom span {

height: 350px;

line-height: 700px;

position: absolute;

width: 20px;

left: 50%;

margin-left: -10px;

top: 10px;

}

#bottom .char1 {

transform: rotate(36deg);

}

#bottom .char2 {

transform: rotate(27deg);

}

#bottom .char3 {

transform: rotate(18deg);

}

#bottom .char4 {

transform: rotate(9deg);

}

#bottom .char5 {

transform: rotate(0deg);

}

#bottom .char6 {

transform: rotate(-9deg);

}

#bottom .char7 {

transform: rotate(-18deg);

}

#bottom .char8 {

transform: rotate(-27deg);

}

#bottom .char9 {

transform: rotate(-36deg);

}

.city {

font-family:"Hammersmith One";

display: inline-block;

width: 100%;

height: 300px;

padding-top: 45px;

text-align: center;

font-size: 3.0em;

z-index: 100;

position: absolute;

top: 50%;

margin-top: -110px;

}

.heart {

animation: HEARTBEAT 2.5s infinite;

}

#top span {

animation: BOUNCE 2.5s infinite;

}

@keyframes HEARTBEAT {

0% {

transform: scale(1);

}

5% {

transform: scale(1.3);

}

10% {

transform: scale(1.1);

}

15% {

transform: scale(1.5);

}

50% {

transform: scale(1);

}

100% {

transform: scale(1);

}

}

@keyframes BOUNCE {

0% {

top: 110px;

}

10% {

top: 80px;

}

15% {

top: 85px;

}

20% {

top: 70px;

}

75% {

top: 110px;

}

100% {

top: 110px;

}

}

/style

script src="js/prefixfree.min.js"/script

/head

body

div class="container bg"

div class="hometown"

div class="heart"

/div

div id="top"Made in/div

div class="city"Boise/div

div id="bottom"With love/div

/div

/div

div style="text-align:center;clear:both"

script src="/gg_bd_ad_720x90.js" type="text/javascript"/script

script src="/follow.js" type="text/javascript"/script

/div

script src='js/jquery.js'/script

script src='js/jquery.lettering.js'/script

script src="js/index.js"/script

/body

/html

js部分

(责任编辑:IT教学网)

更多

推荐其他WEB语言文章