* 520 Programmers propose Html+Js+Css Petal album ( love 3D Animation , Custom text )/ A programmer must declare himself

​ annual /520 Valentine's Day / Valentine's day on Chinese Valentine's day / a birthday present / Confession younger martial sister / Programmer's confession ​​,

Very classic programmer style way to express love , It's your ultimate weapon to make your girlfriend happy . In people's impression , Programmers are easy to associate with otaku 、 Dull 、 Such bad words as old-fashioned and so on . There is also a funny saying on the Internet :“ Marry a man, marry a programmer , Money dies early .” How bitter . however …… You're all wrong , Programmers can also be romantic and emotional . Not all IT Men are so dull . Let's take a look at how other programmers use computers to say they love you . Even if I'm bored , Be sexy, too .


* List of articles


* Preface

It's hard to resist the romance of programmers … I'm afraid it takes several years to learn such an advanced way of confession , The data school provides a simple and easy-to-use confession method for the technical white house , You can hold the programmer to confess ~


* Effect demonstration

​ Online demo address ​

1. PC( Computer terminal ) demonstration

 The programmer 520 Tanabata Valentine's Day confession code Html+Js+Css Petal album web page template programmer must express _ Programmer confession source code

 The programmer 520 Tanabata Valentine's Day confession code Html+Js+Css Petal album web page template programmer must express _520 Valentine's Day confession _02

2. H5( Mobile terminal ) demonstration

 The programmer 520 Tanabata Valentine's Day confession code Html+Js+Css Petal album web page template programmer must express _ Programmer confession source code _03

* Code file directory

 The programmer 520 Tanabata Valentine's Day confession code Html+Js+Css Petal album web page template programmer must express _1314 Valentine's day anniversary _04

One 、 Petal album ( Code implementation )

html ( part )

<html  xmlns="http://www.w3.org/1999/xhtml"  xml:lang="en"  lang="en">
<head>
<title> Aestheticism </title>
<meta name="keywords" content=" ">
<meta name="description" content=" ">
<meta name="author" content="www.">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/reset.css" type="text/css" media="all">
<link rel="shortcut icon" href="index/images/favicon.ico">
<link rel="stylesheet" href="css/jquery.fancybox-1.3.4.css" type="text/css" media="screen">
<link rel="stylesheet" href="css/style.css" type="text/css" media="all">
<link href="css/prettyPhoto.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery.min.js" ></script>
<script type="text/javascript" src="js/content_switch.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="js/jquery.mousewheel.js"></script>
<script type="text/javascript" src="js/jquery-ui.js"></script>
<script type="text/javascript" src="js/cScroll.js"></script>
<script src="js/jquery.cycle.all.latest.js" type="text/javascript"></script>
<script src="js/jquery.color.js" type="text/javascript"></script>
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript" src="js/functions.js"></script>
<script src="js/prettyPhoto.js"></script>
a.wb_tencent:hover {
background-color:#0e7fcc;
background-image:-moz-linear-gradient(top,#0771c1,#1288d4);
background-image:-ms-linear-gradient(top,#0771c1,#1288d4);
background-image:-webkit-gradient(linear,0 0,0 100%,from(#0771c1),to(#1288d4));
background-image:-webkit-linear-gradient(top,#0771c1,#1288d4);
background-image:-o-linear-gradient(top,#0771c1,#1288d4);
background-image:linear-gradient(top,#0771c1,#1288d4);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0771c1',endColorstr='#1288d4',GradientType=0);
}
a.wb_tencent span {
display:inline-block;
vertical-align:-5px;
margin-right:7px;
height:20px;
width:24px;
background:url(./images/weibo.png) no-repeat 0 -20px;
}
#abox
{
position: fixed;
_position: absolute;
right: 15px;
z-index: 99999999;
}
</style>
</head>

<body onLoad="checkhtml5()">
<div id="abox">
</div>
<div class="page_spinner">
<div></div>
</div>
<div class="over">
<div class="centre">
<div class="main">
<!--header -->
<header>
<h1><span id="logo"><img src="images/logo1.png" alt="" usemap="#logo"></span></h1>
<nav class="menu">
<ul id="menu">
<li id="nav1"><img src="images/nav1.png" alt=""><span> The oath of love </span></li>
<li id="nav2"><img src="images/nav2.png" alt=""><span> Love process </span> </li>
<li id="nav3"><img src="images/nav3.png" alt=""><span> To go on and on </span></li>
<li id="nav4"><img src="images/nav4.png" alt=""><span> Bless us </span></li>
<li id="nav5"><img src="images/nav5.png" alt=""><span> Image of love </span></li>
<li id="nav6"><img src="images/nav6.png" alt=""><span> Time hourglass </span></li>
</ul>
</nav>

</div>

</body>
</html>

js ( part )

<script>
var RENDERER = {
INIT_CHERRY_BLOSSOM_COUNT: 30,
MAX_ADDING_INTERVAL: 10,

init: function() {
this.setParameters();
this.reconstructMethods();
this.createCherries();
this.render();
setParameters: function() {
this.$container = $('#jsi-cherry-container');
this.width = this.$container.width();
this.height = this.$container.height();
this.context = $('<canvas />')
.attr({ width: this.width, height: this.height })
.appendTo(this.$container)
.get(0)
.getContext('2d');
this.cherries = [];
this.maxAddingInterval = Math.round(
(this.MAX_ADDING_INTERVAL * 1000) / this.width
);
this.addingInterval = this.maxAddingInterval;
},
reconstructMethods: function() {
this.render = this.render.bind(this);
},
var CHERRY_BLOSSOM = function(renderer, isRandom) {
this.renderer = renderer;
this.init(isRandom);
};
CHERRY_BLOSSOM.prototype = {
FOCUS_POSITION: 300,
FAR_LIMIT: 600,
MAX_RIPPLE_COUNT: 100,
RIPPLE_RADIUS: 100,
SURFACE_RATE: 0.5,
SINK_OFFSET: 20,
init: function(isRandom) {
this.x = this.getRandomValue(
-this.renderer.width,
this.renderer.width
);
var axis = this.getAxis(),
theta =
this.theta +
(Math.ceil(
-(this.y + this.renderer.height * this.SURFACE_RATE) / this.vy
) *
Math.PI) /
500;
theta %= Math.PI * 2;

this.offsetY =
40 * (theta <= Math.PI / 2 || theta >= (Math.PI * 3) / 2 ? -1 : 1);
this.thresholdY =
this.renderer.height / 2 +
this.renderer.height * this.SURFACE_RATE * axis.rate;
this.entityColor.addColorStop(
0,
'hsl(330, 70%, ' + 50 * (0.3 + axis.rate) + '%)'
);
this.entityColor.addColorStop(
0.05,
'hsl(330, 40%,' + 55 * (0.3 + axis.rate) + '%)'
);
this.entityColor.addColorStop(
1,
'hsl(330, 20%, ' + 70 * (0.3 + axis.rate) + '%)'
);
$(function() {
RENDERER.init();
});
</script>

css ( Album section )

.box {
          
width: 200px;
height: 200px;
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: 100% 100%;
position: absolute;
margin-left: 42%;
margin-top: 22%;
-webkit-transform-style: preserve-3d;
-webkit-transform: rotateX(13deg);
-webkit-animation: move 5s linear infinite;
}
.minbox li:nth-child(1) {
background: url(../img/01.png) no-repeat 0 0;
-webkit-transform: translateZ(50px);
}
.minbox li:nth-child(2) {
background: url(../img/02.png) no-repeat 0 0;
-webkit-transform: rotateX(180deg) translateZ(50px);
}
.minbox li:nth-child(3) {
background: url(../img/03.png) no-repeat 0 0;
-webkit-transform: rotateX(-90deg) translateZ(50px);
}
.minbox li:nth-child(4) {
background: url(../img/04.png) no-repeat 0 0;
-webkit-transform: rotateX(90deg) translateZ(50px);
}
.minbox li:nth-child(5) {
background: url(../img/05.png) no-repeat 0 0;
-webkit-transform: rotateY(-90deg) translateZ(50px);
}
.minbox li:nth-child(6) {
background: url(../img/06.png) no-repeat 0 0;
-webkit-transform: rotateY(90deg) translateZ(50px);
}
.maxbox li:nth-child(1) {
background: url(../img/1.png) no-repeat 0 0;
-webkit-transform: translateZ(50px);
}
.maxbox li:nth-child(2) {
background: url(../img/2.png) no-repeat 0 0;
-webkit-transform: translateZ(50px);
}
.maxbox li:nth-child(3) {
background: url(../img/3.png) no-repeat 0 0;
-webkit-transform: rotateX(-90deg) translateZ(50px);
}
.maxbox li:nth-child(4) {
background: url(../img/4.png) no-repeat 0 0;
-webkit-transform: rotateX(90deg) translateZ(50px);
}
.maxbox li:nth-child(5) {
background: url(../img/5.png) no-repeat 0 0;
-webkit-transform: rotateY(-90deg) translateZ(50px);
}
.maxbox li:nth-child(6) {
background: url(../img/6.png) no-repeat 0 0;
-webkit-transform: rotateY(90deg) translateZ(50px);
}
.maxbox {
width: 800px;
height: 400px;
position: absolute;
left: 0;
top: -20px;
-webkit-transform-style: preserve-3d;
}
.maxbox li {
width: 200px;
height: 200px;
background: #fff;
border: 1px solid #ccc;
position: absolute;
left: 0;
top: 0;
opacity: 0.2;
-webkit-transition: all 1s ease;
}
.maxbox li:nth-child(1) {
-webkit-transform: translateZ(100px);
}
.maxbox li:nth-child(2) {
-webkit-transform: rotateX(180deg) translateZ(100px);
}
.maxbox li:nth-child(3) {
-webkit-transform: rotateX(-90deg) translateZ(100px);
}
.maxbox li:nth-child(4) {
-webkit-transform: rotateX(90deg) translateZ(100px);
}
.maxbox li:nth-child(5) {
-webkit-transform: rotateY(-90deg) translateZ(100px);
}
.maxbox li:nth-child(6) {
-webkit-transform: rotateY(90deg) translateZ(100px);
}

Two 、3D Album clipping ( course )

The tutorial is as follows : need 12 A picture ( Customizable 12 Zhang )

1-6 The picture is big ​​400px*400px​​​ ,01-06 The picture is a small picture ​​100px*100px​

Will be ready for the picture , Replace... By yourself img The picture in the file can be !

 The programmer 520 Tanabata Valentine's Day confession code Html+Js+Css Petal album web page template programmer must express _520 Valentine's Day confession _05

1. Photo cutting ( course )

First : Download Meitu XiuXiu / Baidu download / Or software installation

Or use online links to crop —> ​​ Online clip image links ​

 The programmer 520 Tanabata Valentine's Day confession code Html+Js+Css Petal album web page template programmer must express _ Programmer confession source code _06

2. Meitu Xiu Xiu ( Computer version ) Cut the picture

2.1 Select Picture clipping

 The programmer 520 Tanabata Valentine's Day confession code Html+Js+Css Petal album web page template programmer must express _1314 Valentine's day anniversary _07

3、 ... and 、 song mp3 Replace tutorial ( course )

If it needs to be replaced ​​mp3​​​ The background music , You can download and replace it by yourself ~ ​​mp3 Free download address ​

1. Search for songs you need

 The programmer 520 Tanabata Valentine's Day confession code Html+Js+Css Petal album web page template programmer must express _ Programmer confession source code _08

2. download

 The programmer 520 Tanabata Valentine's Day confession code Html+Js+Css Petal album web page template programmer must express _ Valentine's day html Source code _09

3 Get songs id

 The programmer 520 Tanabata Valentine's Day confession code Html+Js+Css Petal album web page template programmer must express _css Love Album _10

4 Pay attention to the official account. / Copy link to browser open

 The programmer 520 Tanabata Valentine's Day confession code Html+Js+Css Petal album web page template programmer must express _ Programmer confession source code _11

5 download mp3 ~ After downloading, replace it by yourself mp3 File can ( If you don't want to modify the code , The name must be consistent )

 The programmer 520 Tanabata Valentine's Day confession code Html+Js+Css Petal album web page template programmer must express _520 Valentine's Day confession _12


Four 、 Good web effect , How to send links to others ?

1.1 Solve the deployment online ~> Deploy online tools ( It can be used permanently and free of charge )

1. You don't need to buy a server to deploy online , Your connection is accessible all over the world , Here is a necessary artifact for programmers ~

Plugins are integrated with super easy-to-use plug-ins , Download and install for free , Simple and easy to understand , It's an artifact ~ If necessary, it can be found in the article ↓ Xiagong Z Number acquisition

2. Is to do your code effect well , Deploy online , Send links to others , You can let the other party click in through your connection , You can see the effect of your web page , Both computer and mobile terminals are OK ! ( Otherwise, people will send files when they see your web page , The experience is not very good ~)

1.1 Deployment process

 The programmer 520 Tanabata Valentine's Day confession code Html+Js+Css Petal album web page template programmer must express _ Programmer confession source code _13

1.2 wow ~ Deployment success

wow ~ Deployment success ! Deploy your written page online , People all over the world can access your web page through links ( Free forever )~

 The programmer 520 Tanabata Valentine's Day confession code Html+Js+Css Petal album web page template programmer must express _520 Valentine's Day confession _14



7、 ... and 、* More confession source code

​100 Paragraph confession source code demonstration address ​