HTML 内容
<div id="jsi-cherry-container"></div>
<section class="container" id="contact" >
<form class="flip">
<div class="front">
<h2>To Ming</h2>
<a id="flip2back" href="#">Flip</a>
</div>
<div id="content" class="back">
<div id="letter">
<div class="container">
<div class="flip">
<div class="front"></div>
<div class="back">
<p class="letter"></p>
<a id="close" href="#">Close</a>
</div>
</div>
</div>
</div>
<div id="top">
<a id="flip" href="#contact">Flip</a>
</div>
<div id="lid" class="container">
<div class="flip">
<div class="front">
<a id="open" href="#content"><span></span></a>
</div>
<div class="back"></div>
</div>
</div>
</div>
</form>
</section>
<div id="footer">
<audio id="music2" preload="auto" loop></audio>
<a id="music_btn2" href="javascript:playPause();"></a>
</div>
部分CSS
#letter {
background: #fafafa;
width: 90%;
height: 95%;
position: absolute;
left: 5%;
top: 5%;
z-index: 0;
-webkit-transition: .5s .5s;
-moz-transition: .5s .5s;
-o-transition: 0s 0s;
transition: 0s 0s; }
#content:target #letter {
top: -40%;
-o-transition: .5s .5s;
transition: .5s .5s; }
#letter .container {
position: absolute;
width: 100%;
/*height: 50%;*/
-webkit-perspective: 800px;
-moz-perspective: 800px;
perspective: 800px;
top: 0;
left: 0;
-webkit-transition: 0s 0s;
-moz-transition: 0s 0s;
transition: 0s 0s;
z-index: 1; }
#letter .flip {
width: 100%;
height: 100%; }
#letter .flip {
position: absolute;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transition: -webkit-transform 0.5s 0s;
-moz-transition: -moz-transform 0.5s 0s;
transition: -moz-transform 0.5s 0s;
-webkit-transform-origin: left top;
-moz-transform-origin: left top;
transform-origin: left top; }
#letter .flip > .front, #letter .flip > .back {
position: absolute;
width: 100%;
height: 100%;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
backface-visibility: hidden; }
#letter .flip > .back {
-webkit-transform: rotateX(180deg);
-moz-transform: rotateX(180deg);
transform: rotateX(180deg); }
#content:target #letter .flip {
-webkit-transform: rotateX(180deg);
-moz-transform: rotateX(180deg);
transform: rotateX(180deg);
-webkit-transition-duration: 0.5s;
-moz-transition-duration: 0.5s;
transition-duration: 0.5s;
-webkit-transition-delay: 1s;
-moz-transition-delay: 1s;
transition-delay: 1s; }
letter.js
var aparted = false;
$("#open").click(function(){
if(!aparted)
{
var typed = new Typed('.letter', {
strings: ["^1000Dear Ming",
"M^200ing<br><br> 夜には^300いつも^200寒いよね、^600でも、^600手を^200繋いでいると、^600暖か^200くなるよ!<br> どんなに^300寒い夜も、^600君と^300二人でいれば、^600ちっとも^300寒くない!<br><br><p style='float:right; display:block; width:80px;'>^1000H^200ao</p>"],
typeSpeed: 100,
backSpeed: 50
});
$('#open').find("span").eq(0).css('background-position', "0 -150px");
aparted = true;
var music = document.getElementById('music2');
if (music.paused)
{
music.play();
$('#music_btn2').css("opacity", "1");
}
}
});
function playPause() {
var music = document.getElementById('music2');
var music_btn = $('#music_btn2');
if (music.paused){
music.play();
music_btn.css("opacity", "1");
}
else{
music.pause();
music_btn.css("opacity", "0.2");
}
}
window.onload = function () {
var currentUrl = window.location.href;
var firstIndex = currentUrl.indexOf("#");
if (firstIndex <= 0) window.location.href = currentUrl + "#contact";
$('#music2').attr('src', bgmsrc);
document.addEventListener('touchstart',function (event) { if(event.touches.length > 1) event.preventDefault(); });
var lastTouchEnd = 0;
document.addEventListener('touchend',function (event) {
var now = (new Date()).getTime();
if(now - lastTouchEnd <= 300) event.preventDefault();
lastTouchEnd = now;
}, false);
document.addEventListener('gesturestart', function (event) { event.preventDefault(); });
$('body').css('opacity', '1');
$('#jsi-cherry-container').css('z-index', '-99');
}
演示图片
💕浪漫信封在线演示地址:http://haiyong.site/demo/eluvletter
HTML 内容
<canvas id="sakura"></canvas>
<div class="btnbg">
</div>
<footer class="page-footer">
<span>made by </span>
<a href="http://haiyong.site/moyu" target="_blank">
<img class="touxiang" src="http://haiyong.site/wp-content/uploads/2021/07/cropped-59255587-1-192x192.jpg" alt="George Martsoukos logo">
</a>
</footer>
CSS 内容
body {
padding:0;
margin:0;
overflow:hidden;
height: 600px;
}
canvas {
padding:0;
margin:0;
}
div.btnbg {
position:fixed;
left:0;
top:0;
}
.page-footer {
position: fixed;
right: 0;
bottom: 20px;
display: flex;
align-items: center;
padding: 5px;
color: black;
background: rgba(255, 255, 255, 0.65);
}
.page-footer a {
display: flex;
margin-left: 4px;
}
.touxiang{
width:24px;
height:24px;
}
部分 JS 内容
<script id="sakura_point_vsh" type="x-shader/x_vertex">
**自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。**
**深知大多数Python工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!**
**因此收集整理了一份《2024年Python开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。**
![img](https://img-blog.csdnimg.cn/img_convert/48b552762a91faae8f70a330085f8b4b.png)
![img](https://img-blog.csdnimg.cn/img_convert/f243d982e0026296288ce8b133aebbcc.png)
![img](https://img-blog.csdnimg.cn/img_convert/e01bbfa4e2a1bc990c4ae63e43a0e3db.png)
![img](https://img-blog.csdnimg.cn/img_convert/c02f7ead0090e2637545622367911b85.png)
![img](https://img-blog.csdnimg.cn/img_convert/6c361282296f86381401c05e862fe4e9.png)
![img](https://img-blog.csdnimg.cn/img_convert/9f49b566129f47b8a67243c1008edf79.png)
**既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上前端开发知识点,真正体系化!**
**由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新**
**如果你觉得这些内容对你有帮助,可以扫码获取!!!(备注Python)**
j3-1712871918919)]
[外链图片转存中...(img-6dLSi5oY-1712871918919)]
[外链图片转存中...(img-0wYITlHp-1712871918920)]
[外链图片转存中...(img-PRl81edj-1712871918920)]
![img](https://img-blog.csdnimg.cn/img_convert/6c361282296f86381401c05e862fe4e9.png)
![img](https://img-blog.csdnimg.cn/img_convert/9f49b566129f47b8a67243c1008edf79.png)
**既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上前端开发知识点,真正体系化!**
**由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新**
**如果你觉得这些内容对你有帮助,可以扫码获取!!!(备注Python)**
<img src="https://img-community.csdnimg.cn/images/fd6ebf0d450a4dbea7428752dc7ffd34.jpg" alt="img" style="zoom:50%;" />