浏览网站看到苦逼的表白程序,忍不住都保存下来。这就是程序员的浪费

news/2024/5/13 13:06:36/文章来源:https://blog.csdn.net/weixin_30458043/article/details/95050705

第一个场面

 

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>#三行情书#</title>
<link rel="shortcut icon" href="./logo.ico" type="image/x-icon" />
<link type="text/css" rel="stylesheet" href='http://fonts.googleapis.com/css?family=Ubuntu:300italic,300,700' />
<link rel="stylesheet" type="text/css" href="./css/main.css">
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="main.js"></script>
<style>* {box-sizing: border-box;
}body {padding: 0;margin: 0;background: #212121;overflow: hidden;
}.mosaica {position: fixed;left: 2px;bottom: 2px;padding: 4px 6px;color: #FFFFFF;font-family: "Montserrat";font-size: 11px;letter-spacing: 0.06em;
}
.mosaica a{color: #fff;font-size: 30px;text-decoration: none;margin: 0 0 0 30px;
}
.mosaica a:hover{color: orange;
}
.container {position: absolute;width: 0;height: 0;left: 43%;top: 50%;perspective: 1200px;transform-origin: center center;cursor: move;
}.plane {position: absolute;display: block;width: 900px;height: 700px;border: 0;margin: -350px 0 0 -450px;transform-style: preserve-3d;
}
.plane:before {content: "";position: absolute;left: 0;top: 0;background: url('../img/background.jpg') no-repeat;background-size: 100% 700px;width: 100%;height: 100%;z-index: -1;transform: translateZ(-1px);
}.items {position: relative;transform-style: preserve-3d;
}.item {background-color: pink;position: absolute;overflow: hidden;/*border: 1px solid #2785db;*/
}
.item2,
.item3{position: absolute;left: 0;top:0;overflow: hidden;width: 100%;height: 100%;background:url(../img/heart.png) no-repeat center;background-size: 85px 69.5px;color: #fff;text-align: center;font-size: 75px;line-height: 87.5px;font-family: "微软雅黑","helvetica neue",arial,sans-serif;font-weight: 900;text-shadow:0 1px 0 rgba(0, 0, 0, 0.3);
}@keyframes animate {0% {transform: translate3d(0px, 0px, 0px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale3d(1, 1, 1);transform-origin: 50% 50% 0;opacity: 1;} 100% {transform: translate3d(0px, 0px, 1200px) rotateX(180deg) rotateY(360deg) rotateZ(180deg) scale3d(0, 0, 0);transform-origin: 50% 50% 0;opacity: 1;}
}
@keyframes animate3 {0% {transform: translate3d(0px, 0px, 0px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale3d(1, 1, 1);transform-origin: 50% 50% 0;font-size: 75px;opacity: 1;}  100% {transform: translate3d(0px, 0px, 1200px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale3d(0, 0, 0);transform-origin: 50% 50% 0;font-size: 150px;opacity: 1;color: orange;}
}.item.animate {transform: translate3d(0px, 0px, 0px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale3d(1, 1, 1);transform-origin: 50% 50% 0;animation: animate 15s forwards;
}
.item2.animate {transform: translate3d(0px, 0px, 0px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale3d(1, 1, 1);transform-origin: 50% 50% 0;animation: animate 10s forwards;
}
.item3.animate {transform: translate3d(0px, 0px, 0px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale3d(1, 1, 1);transform-origin: 50% 50% 0;animation: animate3 10s forwards;
}
.poem{position: absolute;top:18%;left: 78%;line-height: 80px;color: #fff;font-size: 30px;font-family: "微软雅黑","helvetica neue",arial,sans-serif;font-weight: 800;text-shadow:1px 0px #009807, 1px 2px #006705, 3px 1px #009807, 2px 3px #006705, 4px 2px #009807, 4px 4px #006705, 5px 3px #009807;
}
</style>
</head>
<body><audio autoplay="autopaly"><source src="song.mp3" type="audio/mp3" /></audio>  <div class="poem">梦随风醉缠绵<br>情如茧凝成缘<br>百花牵衣吐艳</div>
<div class="container"><div id="plane1" class="plane"><div class="items"><!-- 第一行 --><div class="item" style="top: 0px; left: 0px; width: 100px; height: 87.5px; animation-delay: 8.64s;background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item" style="top: 0px; left: 100px; width: 100px; height: 87.5px; animation-delay: 8.56s; background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item3" style="top: 0px; left: 200px; width: 100px; height: 87.5px; animation-delay: 14.96s; background: url('./img/12.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item" style="top: 0px; left: 300px; width: 100px; height: 87.5px; animation-delay: 9.74s; background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item" style="top: 0px; left: 400px; width: 100px; height: 87.5px; animation-delay: 8.28s; background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item" style="top: 0px; left: 500px; width: 100px; height: 87.5px;animation-delay: 8.88s;  background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item" style="top: 0px; left: 600px; width: 100px; height: 87.5px;animation-delay: 14.96s;  background: url('./img/12.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item" style="top: 0px; left: 700px; width: 100px; height: 87.5px; animation-delay: 9.76s; background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item" style="top: 0px; left: 800px; width: 100px; height: 87.5px; animation-delay: 8.4s; background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item2" style="top: 0px; left: 200px; width: 100px; height: 87.5px; animation-delay: 1.64s; font-size: 25px;"></div><div class="item2" style="top: 0px; left: 600px; width: 100px; height: 87.5px; animation-delay: 2.44s;  font-size: 25px;"></div><!-- 第二行 --><div class="item" style="top: 87.5px; left: 0px; width: 100px; height: 87.5px; animation-delay: 8.12s; background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item" style="top: 87.5px; left: 100px; width: 100px; height: 87.5px; animation-delay: 14.96s; background: url('./img/12.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item3" style="top: 87.5px; left: 200px; width: 100px;height: 87.5px;animation-delay: 15.96s;  background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item" style="top: 87.5px; left: 300px; width: 100px; height: 87.5px; animation-delay: 14.96s; background: url('./img/12.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item" style="top: 87.5px; left: 400px; width: 100px; height: 87.5px; animation-delay: 8.8s; background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item" style="top: 87.5px; left: 500px; width: 100px; height: 87.5px; animation-delay: 14.96s; background: url('./img/12.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item3" style="top: 87.5px; left: 600px; width: 100px;height: 87.5px;animation-delay: 15.96s;  background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item" style="top: 87.5px; left: 700px; width: 100px;height: 87.5px;animation-delay: 14.96s;  background: url('./img/12.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item" style="top: 87.5px; left: 800px; width: 100px; height: 87.5px; animation-delay: 9.48s; background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item2" style="top: 87.5px; left: 100px; width: 100px; height: 87.5px; animation-delay: 1.24s;font-size: 25px;"></div><div class="item2" style="top: 87.5px; left: 300px; width: 100px; height: 87.5px; animation-delay: 1.84s;font-size: 25px;"></div><div class="item2" style="top: 87.5px; left: 500px; width: 100px; height: 87.5px; animation-delay: 2.24s;font-size: 25px;"></div><div class="item2" style="top: 87.5px; left: 700px; width: 100px;height: 87.5px;animation-delay: 2.64s; font-size: 25px;"></div><!-- 第三行 --><div class="item" style="top: 175px; left: 0px; width: 100px; height: 87.5px; animation-delay: 14.96s; background: url('./img/12.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item3" style="top: 175px; left: 100px; width: 100px; height: 87.5px; animation-delay: 15.96s; background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item3" style="top: 175px; left: 200px; width: 100px; height: 87.5px; animation-delay: 15.96s; background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item3" style="top: 175px; left: 300px; width: 100px; height: 87.5px; animation-delay: 15.96s; background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 175px; left: 400px; width: 100px; height: 87.5px; animation-delay: 14.96s; background: url('./img/12.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item3" style="top: 175px; left: 500px; width: 100px; height: 87.5px;animation-delay: 15.96s;  background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item3" style="top: 175px; left: 600px; width: 100px; height: 87.5px;animation-delay: 15.96s;  background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item3" style="top: 175px; left: 700px; width: 100px; height: 87.5px; animation-delay: 15.96s; background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item" style="top: 175px; left: 800px; width: 100px; height: 87.5px; animation-delay: 14.96s; background: url('./img/12.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item2" style="top: 175px; left: 0px; width: 100px; height: 87.5px; animation-delay: 1.04s;font-size: 25px;"></div><div class="item2" style="top: 175px; left: 400px; width: 100px; height: 87.5px; animation-delay: 2.04s;font-size: 25px;"></div><div class="item2" style="top: 175px; left: 800px; width: 100px; height: 87.5px; animation-delay: 2.84s;font-size: 25px;"></div><!-- 第四行 --><div class="item" style="top: 262.5px; left: 0px; width: 100px; height: 87.5px; animation-delay: 14.96s; background: url('./img/12.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item3" style="top: 262.5px; left: 100px; width: 100px; height: 87.5px; animation-delay: 15.96s; background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item3" style="top: 262.5px; left: 200px; width: 100px;height: 87.5px;animation-delay: 15.96s;  background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item3" style="top: 262.5px; left: 300px; width: 100px; height: 87.5px; animation-delay: 15.96s; background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item3" style="top: 262.5px; left: 400px; width: 100px; height: 87.5px; animation-delay: 15.96s; background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item3" style="top: 262.5px; left: 500px; width: 100px; height: 87.5px; animation-delay: 15.96s; background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item3" style="top: 262.5px; left: 600px; width: 100px;height: 87.5px;animation-delay: 15.96s;  background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item3" style="top: 262.5px; left: 700px; width: 100px;height: 87.5px;animation-delay: 15.96s;  background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 262.5px; left: 800px; width: 100px; height: 87.5px; animation-delay: 14.96s; background: url('./img/12.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item2" style="top: 262.5px; left: 0px; width: 100px; height: 87.5px; animation-delay: 4.64s;font-size: 25px;"></div><div class="item2" style="top: 262.5px; left: 800px; width: 100px; height: 87.5px; animation-delay: 3.04s;font-size: 25px;"></div><!-- 第五行 --><div class="item" style="top: 350px; left: 0px; width: 100px; height: 87.5px; animation-delay: 8.04s; background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item" style="top: 350px; left: 100px; width: 100px; height: 87.5px; animation-delay: 14.96s; background: url('./img/12.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item3" style="top: 350px; left: 200px; width: 100px; height: 87.5px; animation-delay: 15.96s; background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item3" style="top: 350px; left: 300px; width: 100px; height: 87.5px; animation-delay: 15.96s; background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item3" style="top: 350px; left: 400px; width: 100px; height: 87.5px; animation-delay: 15.96s; background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item3" style="top: 350px; left: 500px; width: 100px; height: 87.5px;animation-delay: 15.96s;  background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item3" style="top: 350px; left: 600px; width: 100px; height: 87.5px;animation-delay: 15.96s;  background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 350px; left: 700px; width: 100px; height: 87.5px; animation-delay: 14.96s; background: url('./img/12.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item" style="top: 350px; left: 800px; width: 100px; height: 87.5px; animation-delay: 8.4s; background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item2" style="top: 350px; left: 100px; width: 100px; height: 87.5px; animation-delay: 4.44s; font-size: 25px;"></div><div class="item3" style="top: 350px; left: 300px; width: 100px; height: 87.5px; animation-delay: 5.64s; background:none; "> I</div><div class="item3" style="top: 350px; left: 400px; width: 100px; height: 87.5px; animation-delay: 5.64s; background:none; "> L</div><div class="item3" style="top: 350px; left: 500px; width: 100px; height: 87.5px; animation-delay: 5.64s;  background:none; "> U</div><div class="item2" style="top: 350px; left: 700px; width: 100px; height: 87.5px; animation-delay: 3.24s; font-size: 25px;"></div><!-- 第六行 --><div class="item" style="top: 437.5px; left: 0px; width: 100px; height: 87.5px; animation-delay: 9.68s; background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 437.5px; left: 100px; width: 100px; height: 87.5px; animation-delay: 8.01s; background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 437.5px; left: 200px; width: 100px;height: 87.5px;animation-delay: 14.96s;  background: url('./img/12.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item3" style="top: 437.5px; left: 300px; width: 100px; height: 87.5px; animation-delay: 15.96s; background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item3" style="top: 437.5px; left: 400px; width: 100px; height: 87.5px; animation-delay: 15.96s; background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item3" style="top: 437.5px; left: 500px; width: 100px; height: 87.5px; animation-delay: 15.96s; background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 437.5px; left: 600px; width: 100px;height: 87.5px;animation-delay: 14.96s;  background: url('./img/12.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 437.5px; left: 700px; width: 100px;height: 87.5px;animation-delay: 8.29s;  background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 437.5px; left: 800px; width: 100px; height: 87.5px; animation-delay: 9.2s; background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item2" style="top: 437.5px; left: 200px; width: 100px; height: 87.5px; animation-delay: 4.24s;font-size: 25px;"></div><div class="item2" style="top: 437.5px; left: 600px; width: 100px; height: 87.5px;animation-delay: 3.44s; font-size: 25px;"></div><!-- 第七行 --><div class="item" style="top: 525px; left: 0px; width: 100px; height: 87.5px; animation-delay: 8.98s; background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 525px; left: 100px; width: 100px; height: 87.5px; animation-delay: 9.15s; background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 525px; left: 200px; width: 100px;height: 87.5px;animation-delay: 8.78s;  background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 525px; left: 300px; width: 100px; height: 87.5px; animation-delay: 14.96s; background: url('./img/12.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item3" style="top: 525px; left: 400px; width: 100px; height: 87.5px; animation-delay:15.96s; background: url('./img/100.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 525px; left: 500px; width: 100px; height: 87.5px; animation-delay: 14.96s; background: url('./img/12.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 525px; left: 600px; width: 100px;height: 87.5px;animation-delay: 8.12s;  background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 525px; left: 700px; width: 100px;height: 87.5px;animation-delay: 8.68s;  background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 525px; left: 800px; width: 100px; height: 87.5px; animation-delay: 8.97s; background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item2" style="top: 525px; left: 300px; width: 100px; height: 87.5px; animation-delay: 4.04s;font-size: 25px;"></div><div class="item2" style="top: 525px; left: 500px; width: 100px; height: 87.5px;animation-delay: 3.64s; font-size: 25px;"></div><!-- 第八行 --><div class="item" style="top: 612.5px; left: 0px; width: 100px; height: 87.5px; animation-delay: 8.89s; background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 612.5px; left: 100px; width: 100px; height: 87.5px; animation-delay: 8.87s; background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 612.5px; left: 200px; width: 100px;height: 87.5px;animation-delay: 8.99s;  background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 612.5px; left: 300px; width: 100px; height: 87.5px; animation-delay: 8.25s; background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item" style="top: 612.5px; left: 400px; width: 100px; height: 87.5px; animation-delay:14.96s; background: url('./img/12.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 612.5px; left: 500px; width: 100px; height: 87.5px; animation-delay: 8.97s; background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 612.5px; left: 600px; width: 100px;height: 87.5px;animation-delay: 8.9s;  background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 612.5px; left: 700px; width: 100px;height: 87.5px;animation-delay: 9s;  background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"> </div><div class="item" style="top: 612.5px; left: 800px; width: 100px; height: 87.5px; animation-delay: 8.5s; background: url('./img/13.jpg') no-repeat; background-size: 100% 87.5px;"></div><div class="item2" style="top: 612.5px; left: 400px; width: 100px; height: 87.5px; animation-delay: 3.84s;font-size: 25px;"></div></div></div>
</div>
</body>
</html>

 第二个场面,动态心砰砰动

<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8"/>
<title>myHeart</title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
.heart{
position:absolute;
left: 50%;
top:50%;
margin-left: -150px;
margin-top: -135px;
width: 300px;
height:270px;
background: transparent;
/*box-shadow: 2px 2px 5px #000;*/
filter:drop-shadow(0px 0px 20px rgb(255,20,20));
animation: test 1s linear infinite;
}
.heart:before,
.heart:after{
content: "";
position: absolute;
left: 150px;
width: 150px;
height: 240px;
background: rgb(255,0,0);
border-radius: 150px 150px 0 0;
transform:rotate(-45deg);
transform-origin: 0 100%;
}
.heart:after{
left: 0;
transform:rotate(45deg);
transform-origin: 100% 100%;
}
@keyframes test{
0%{
transform: scale(0.8,0.8);
opacity: 1;
}
25%{
transform: scale(1,1);
opacity: 0.8;
}
100%{
transform: scale(0.8,0.8);
opacity: 1;
}
}
</style>
</head>
<body>
<div class="heart"></div>
<script>
// alert(window.navigator.userAgent);
</script>
</body>
</html>

第三个场景,画出一个心

<!DOCTYPE html> 
<html> 
<head> 
<title>Draw Heart</title> 
<style type="text/css"> 
* { 
margin: 0; 
padding: 0; 
} html { 
height: 100%; 
margin: 0; 
} body { 
height: 100%; 
background-color:white; 
} #canvasZone { 
width: 100%; 
height: 100%; 
text-align: center; 
background-color: black; 
} #myCanvas { 
height:100%; 
display: block; 
/*background-color:aqua;*/ 
} 
</style> 
<script type="text/javascript"> 
var arr = [];//保存所有的XY坐标,只为验证。实际程序中可删除。 
var r = 4; 
var radian;//弧度 
var i; 
var radianDecrement;//弧度增量 
var time = 10;//每个点之间的时间间隔 
var intervalId; 
var num = 360;//分割为 360 个点 
var startRadian = Math.PI; 
var ctx; 
window.onload = function () { 
startAnimation(); 
} 
function startAnimation() { 
ctx = document.getElementById("myCanvas").getContext("2d"); 
//让画布撑满整个屏幕,-20是滚动条的位置,需留出。如滚动条出现则会挤压画布。 
WINDOW_HEIGHT=document.documentElement.clientHeight-20; 
WINDOW_WIDTH=document.documentElement.clientWidth-20; 
ctx.width = WINDOW_WIDTH; 
ctx.heigh = WINDOW_HEIGHT; 
drawHeart(); 
} function drawHeart() { ctx.strokeStyle = "red"; 
ctx.lineWidth = 1;//设置线的宽度 
radian = startRadian;//弧度设为初始弧度 
radianDecrement = Math.PI / num * 2; 
ctx.moveTo(getX(radian), getY(radian));//移动到初始点 
i = 0; 
intervalId = setInterval("printHeart()", time); 
} 
//x = 16 sin^3 t, y = (13 cos t - 5 cos 2t - 2 cos 3t - cos 4t) 
function printHeart() { 
radian += radianDecrement; 
ctx.lineTo(getX(radian), getY(radian));//在旧点和新点之间连线 
//arr.push("X:" + getX(radian) + "<br/>Y:" + getY(radian) + "<br/>"); 
i++; 
ctx.stroke();//画线 
if (i >= num) { 
clearInterval(intervalId); 
//document.getElementById("bs").innerHTML = arr.join("");//打印所有的XY坐标点。 
} 
} 
function getX(t) {//由弧度得到 X 坐标 
return 100 + r * (16 * Math.pow(Math.sin(t), 3)); 
} function getY(t) {//由弧度得到 Y 坐标 
return 50 - r * (13 * Math.cos(t) - 5 * Math.cos(2 * t) - 2 * Math.cos(3 * t) - Math.cos(4 * t)); 
} 
</script> 
</head> 
<body> 
<div id="canvasZone"> 
<canvas id="myCanvas"></canvas> 
</div> 
<div id="bs"> 
</div> 
</body> 
</html>

 

转载于:https://www.cnblogs.com/binmengxue/p/9634784.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.luyixian.cn/news_show_740944.aspx

如若内容造成侵权/违法违规/事实不符,请联系dt猫网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

模拟网站品牌列表的效果

模拟网站品牌列表的效果 说明&#xff1a;用户可以单击商品列表下方的“显示全部品牌”按钮来显示全部的品牌。 单击“显示全部品牌”按钮的同时&#xff0c;列表会将推荐的品牌的名字高这显示&#xff0c;按钮里的文字也换成“精简显示品牌” 附图&#xff1a; <----------…

iis mysql5.7_手动配置网站环境 IIS 10+PHP 7.1+MySQL 5.7

之前配置环境一直用的一键安装包&#xff0c;不管是phpStudy还是lnmp&#xff0c;昨天尝试在自己电脑配置一下iis的环境&#xff0c;也踩了一些坑&#xff0c;整理了一下。测试电脑是Windows10&#xff0c;理论上Win7和IIS7.5都支持的。安装 IIS1&#xff1a;控制面板 > 程序…

p2p网站系统开发_资阳企业系统软件开发技术公司,南京服装网站服务公司

链改(杭州)科技有限公司为您详细解读Fzxdzj资阳企业系统软件开发技术公司的相关知识与详情&#xff0c;网站造做建立&#xff0c;一方面是要展示企业的品牌、实力取卖得货&#xff0c;获得客户对企业的综合认识取信任&#xff1b;另一方面&#xff0c;就是希望通过搜索引擎&…

【温故而知新-CSS】使用CSS设计网站导航栏

1.实现背景变换的导航菜单效果预览&#xff1a; 首页公司频道最新动态客房介绍酒店服务休闲娱乐旅行社源代码&#xff1a; View Code 2.利用CSS制作横向导航 效果预览&#xff1a; 首页公司频道最新动态客房介绍酒店服务休闲娱乐旅行社 本文转自叶超Luka博客园博客&#xff0c;…

seo每日一贴_?新手如何自学SEO,教程、书籍、工具推荐

先简单了解下SEO行业SEO属于搜索引擎推广&#xff0c;什么是搜索引擎推广呢搜索引擎营销通常简称为“SEM”。但现在SEM基本是PPC的简称了&#xff0c;大家可以单独了解下SEM的知识。搜索引擎营销的基本思想是让用户发现信息(被动等用户来&#xff0c;所以用户需求更精准)&#…

利用Virtualbox+ADSL设备搭建网站

设备:TP-LINK路由器 ADSL电信4m Virtualbox虚拟机以及windows2003服务器.. 首先设置虚拟机的网卡, 然后登录路由器设置DHCP. 不知道MAC地址的可以虚拟机查看。 然后转发设置 设置80 你需要的端口 然后ip138.com 查看你的外网ip。 之后就可以访问了。 关于域名解析&#xff1a;可…

使用Nginx实现反向代理过程(一台服务器部署两个网站)

正向代理指的是客户端的 反向代理指的是服务端的 需要实现的反向代理&#xff1a; 1、首先使用SwitchHosts配置不同域名&#xff0c;如下&#xff1a;(SwitchHosts软件在上一篇博客有链接) 2、在Linux上部署两台tomcat服务器&#xff1a;(一个用于sina&#xff0c;一个用于sohu…

从其他网站抓数据

缘由 吃饭的时候和朋友聊天&#xff0c;谈到他上一个项目&#xff0c;他去抓其他网站的数据&#xff0c;然后用canvas画出走势图。吸引我的是前面的抓数据&#xff0c;以前从来没有尝试过&#xff0c;一定会很有意思了&#xff01; 开始 听他讲大致就是用jsonp去请求&#xff0…

内网https需要ssl证书_这些行业需要SSL证书来保障网站安全

无论是工作还是生活需要&#xff0c;我们每天都会访问各种网站。这些网站都是安全的吗?答案自然是否定的。为了确保网站的基本安全&#xff0c;部署SSL证书是关键的一步。那么对于成千上万的行业&#xff0c;哪些行业需要SSL证书&#xff1f;1、银行金融、电子商务企业这种行业…

IE无法打开internet网站已终止操作的解决的方法

用IE内核浏览器的朋友&#xff0c;或许不经意间会碰到这样滴问题&#xff1a;打开某个网页时&#xff0c;浏览器“嘣”跳出一个提示框“Internet Explorer无法打开Internet 站点...已终止操作”。而大多数情况下该页面甚至非常可能看起来已经载入完成&#xff0c;内容能够全然显…

ASP.NET网站管理工具的【安全】功能无法使用问题

在使用ASP.NET网站管理工具时&#xff0c;安全出现下面的问题&#xff1a; 出现这种情况的主要原因是&#xff0c;安全管理中需要创建用户和角色信息&#xff0c;所以要用到数据库&#xff0c;但是你没有设置好数据库。 可以打开vs自带的命令提示工具&#xff1a; 打开后输入as…

网站服务器上加入三层开发的网站错误解决

在网站服务器上添加三层开发的网站&#xff0c;发现网站打开的时候提示Server Error in / Application.截图如下 解决办法&#xff1a; 1,把文件夹中的bin文件夹移动到上一目录下&#xff0c;比如放入该文件的路径是root根目录&#xff0c;然后新建test目录&#xff0c;上传网站…

使用Apache服务部署静态网站

动手安装Apache服务程序。注意&#xff0c;使用yum命令进行安装时&#xff0c;跟在命令后面的Apache服务的软件包名称为httpd。如果直接执行yum install apache命令&#xff0c;则系统会报错&#xff1a;yum install httpd启用httpd服务程序并将其加入到开机启动项中&#xff0…

什么平台拥有高优质的网络推广网站?

在互联网时代&#xff0c;互联网已经渗入到了各种传统的信息传播渠道&#xff0c;尤其是移动互联网时代的到来&#xff0c;普通用户获取的信息变得纷繁多样。从而也促进了新的运营模式孕育而生&#xff0c;诸如新闻营销&#xff0c;它凭借权威、可信度高、传播速度快等独特优势…

中小企业如何选择建站公司

如何选择一家适合自己的网站建设公司&#xff1f;这是每一个准备做网站的公司都关心的话题。对于刚起步资金不雄厚的公司&#xff0c;价格低、能实现简单的功能就可以&#xff0c;那是不是意味着哪个公司做都一样&#xff0c;只看价格呢&#xff1f; 但是这样的网站真的值几百吗…

apache伪静态把css 排除掉_MVC架构网站URL访问原理及伪静态的区分

0x00 前言这是一篇简单易理解的文章.文章目录如下:0x01 什么是MVC(了解)0x02 ThinkPHP5目录理解(了解)0x03 ThinkPHP5多个配置文件关系(了解)0x04 一个URL访问请求的执行流程(重点)0x05 .htaccess文件的作用(入口文件的隐藏)0x06 前后端传参(重点)0x07 伪静态(重点)为什么这个网…

百度mip推送工具_【SEO】利用网页监控来做百度同步推送

百度主送推送&#xff08;实时&#xff09;是在百度站长工具改版升级之后推出的一款帮助站长快速向百度提交链接的工具&#xff0c;有助于让百度快速发现新链接&#xff0c;促进网站收录。它是所有提交方式里面最为快速的一种&#xff0c;建议站长将站点当天新产出链接立即通过…

10设置精美的免费网站后台管理系统模板

虽然转移。但好东西不应该是沉默 原文地址&#xff1a;http://www.cnblogs.com/lhb25/archive/2012/10/19/10-free-html-admin-templates.html 免费下载点&#xff1a;http://download.csdn.net/detail/yangwei19680827/7324845 Admin Panel Template 这个后台管理模板的导航设…

刚学编程的程序员必备这5大编程网站,你知道几个?

一个好的网站&#xff0c;就是程序员学编程的基地。虽说新手程序员也许知道一些在线编程网站&#xff0c;但是质量上乘的编程网站又知道几个呢?下面就来给大家推荐5个质量上乘的编程网站&#xff1a;0、LeetcodeLeetCode是大名鼎鼎的在线刷题网站&#xff0c;通过该网站的刷题…

Linux系统下利用wget命令把整站下载做镜像网站

Linux系统下利用wget命令把整站下载做镜像网站 2011-05-28 18:13:01 | 1次阅读 | 评论&#xff1a;0 条 | itokit 在linux下完整的用wget命令整站采集网站做镜像 的命令是及无视网站根目录下的robots.txt限制。并且可以模拟一个正常浏览者的信息下载该网站。 C/C Code复制内容…