python生日祝福代码霸屏qq可打开(python生日祝福程序)
帮我提供一个‘祝你生日快乐’的html代码啊
前几天一个朋友找到我,他说他女朋友马上过生日,于是想问问我能不能写一个生日祝福代码。好兄弟的请求当然不能拒绝,直接安排!!
于是我用html写了一个简单的页面:点开后会显示来到这个世界多长时间和祝福话语,下滑后是自转相册(有背景音乐)。
原文链接:
html生日快乐代码
核心代码(不是完整代码):
#head
{
width:100%;
height:100%;
position: absolute;
-webkit-transform-style: preserve-3d;
-webkit-animation:donghua 15s linear 0s infinite;
-moz-transform-style: preserve-3d;
-moz-animation:donghua 15s linear 0s infinite;
-ms-transform-style: preserve-3d;
-ms-animation:donghua 25s linear 0s infinite;
}
#head div
{
position: absolute;
top:0;
left:0;
width:300px;
height:400px;
border:1px solid #000
text-align: center;
line-height:100px;
}
#head div:nth-child(1)
{
-webkit-transform:rotateY(0deg) translateZ(400px);
-moz-transform:rotateY(0deg) translateZ(400px);
-ms-transform:rotateY(0deg) translateZ(400px);
background:url(images/01.png);
background-size:cover;
}12345678910111213141516171819202122232425262728293031
Heart.prototype.draw = function(){
this.size -= this.speedSize;
this.x += this.speedX;
this.y += this.speedY;
ctx.save();
ctx.translate(-1000,this.y);
ctx.scale(this.size, this.size);
ctx.beginPath();
for (var i = 0; i precision; i++) {
var vector = this.vertices[i];
ctx.lineTo(vector.x, vector.y);
}
ctx.globalAlpha = this.size;
ctx.shadowBlur = Math.round((3 - this.size) * 10);
ctx.shadowColor = "hsla(0, 100%, 60%,0.5)";
ctx.shadowOffsetX = this.x + 1000;
ctx.globalCompositeOperation = "screen"
ctx.closePath();
ctx.fill()
ctx.restore();
};
function render(a){
requestAnimationFrame(render);
hearts.push(new Heart())
ctx.clearRect(0,0,ww,wh);
for (var i = 0; i hearts.length; i++) {
hearts[i].draw();
if(hearts[i].size = 0){
hearts.splice(i,1);
i--;
}
}
}
onResize();
window.addEventListener("mousemove", onMove);
window.addEventListener("touchmove", onMove);
window.addEventListener("resize", onResize);
requestAnimationFrame(render);
window.οnlοad=function starttime(){
time(h1,'2000,1,1'); ? ? // 出生时间
ptimer = setTimeout(starttime,1000); // 添加计时器
}
function time(obj,futimg){
var nowtime = new Date().getTime(); // 现在时间转换为时间戳
var futruetime = ?new Date(futimg).getTime(); // 未来时间转换为时间戳
var msec = nowtime-futruetime; // 毫秒 未来时间-现在时间
var time = (msec/1000); ?// 毫秒/1000
var day = parseInt(time/86400); // 天 ?24*60*60*1000
var hour = parseInt(time/3600)-24*day; ? ?// 小时 60*60 总小时数-过去的小时数=现在的小时数
var minute = parseInt(time%3600/60); // 分 -(day*24) 以60秒为一整份 取余 剩下秒数 秒数/60 就是分钟数
var second = parseInt(time%60); ?// 以60秒为一整份 取余 剩下秒数
obj.innerHTML="陈陈br你已经来到这个世界:br"+day+"天"+hour+"小时"+minute+"分"+second+"秒"+"了brspan今日是你的生日,愿所有的快乐、所有的幸福、所有的温馨、所有的好运围绕在你身边。生日快乐!/spanp下br滑br有br惊br喜/p"
return true;
}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
效果如下:
这里面的文字可以自行修改,并且时间是会一直走动的,出生时间改成你女朋友的。
下滑后有自转照片:
照片可以自己换哦。
补充:
很多朋友想手机端打开文件,那就需要换图片的地址和音频的地址(你可以发一个仅自己可见的说说,然后就可以生成图片的链接地址了),此时只需要发html文件就可以用手机浏览器打开了。
上图的地址换成图片的链接网址(一共十个)。
对于音频文件,我这里提供一个链接(可能过期):
上图的地址换成音频的链接网址。
大家可以网上找音乐外链。
如果是特定的音频录音,可以用这个方法:利用邮箱附件的形式,比如QQ邮箱,给自己发一封邮件,把音乐以附件的形式附带在上面,收信的时候用来下载附件的那个地址,就是歌曲的下载链接了。
完整项目:
里面有我自己找的十张照片和两个背景音乐(可以换成自己的录音),另外还有使用说明。
完整项目地址:html生日快乐代码
qq可以自己输内容的生日代码
是可以自己进行设定的。
QQ可以自己输入内容的生日代码是提供这一项服务的,同时,在生日的时候也会给你送上祝福和礼物。
有很多软件会记录客户的生日。
生日祝福的代码,时间搞不懂~~谢谢帮忙~
问题是:例如A的生日是今天,B的生日是明天,结果昨天中午12点起到今天上午12点前就显示是A的生日,过了中午12点就显示为B的生日了。时间上挪了12小时,也就是它是以中午12点为转换点,而不是晚上12点为转换点。。求助!谢谢!!!代码如下
body BGCOLOR="#DEDEDE" TEXT="#000000" oncontextmenu=self.event.returnValue=false
div align="center"FONT COLOR=red FACE=隶书 SIZE=6
SCRIPT LANGUAGE="JavaScript"
function birthday(year,month,date,person) {
this.year=year
this.month=month
this.date=date
this.person=person
}
function birthdaylist() {
}
blist=new birthdaylist()
blist[86]= new birthday(1980,10,24,"朋友名字")
blist[86]= new birthday(1980,6,4,"小明")
//以上加如你的朋友生日列表,格式如上
var now=new Date()
today=new Date(now.getYear(),now.getMonth(),now.getDate()) // today 0:00:00
function daysFromToday(sdate) {
return Math.round((sdate.getTime()-today.getTime())/(24*60*60*1000))
}
function writeNextBirthday(list) {
var daysToClosest=888
var closest
for (var i in list) {
thisDate=new Date(today.getYear(),list[i].month-1,list[i].date)
if (daysFromToday(thisDate)0)
thisDate.setYear(today.getYear()+1)
if (daysFromToday(thisDate)daysToClosest) {
daysToClosest=daysFromToday(thisDate)
closest=i
}
}
if (daysToClosest==0)
// document.write("B今天["+list[closest].person+"]"+"["+(today.getYear()-list[closest].year)+"]岁大寿!祝你生日快乐^0^/B")
document.write("BFONT COLOR=red 今天是["+list[closest].person+"]"+"的生日!祝你生日快乐/B")
else if (daysToClosest==1)
document.write("FONT COLOR=blue 明天是["+list[closest].person+"]的生日!大家不要忘了~")
else
document.write("[font color=red"+list[closest].person+"]/font将在["+daysToClosest+"]天后过生日")
}
/SCRIPT
/FONT/div
TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" BORDERCOLORDARK="#FFFFFF" BORDERCOLOR="#000000" ALIGN="CENTER"
TR BGCOLOR="#CCFFCC" TD bgcolor="#DFDFDF" DIV ALIGN="center"FONT COLOR=red SIZE="5"strong会 员 生 日 榜/strong/FONT/DIV
DIV ALIGN="CENTER"SCRIPT LANGUAGE=JavaScript
today=new Date();
function initArray(){
this.length=initArray.arguments.length
for(var i=0;ithis.length;i++)
this[i+1]=initArray.arguments[i] }
var d=new initArray(
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六");
document.write(
"font color=##000000 style='font-size:9pt;font-family: 宋体' ",
today.getYear(),"年",
today.getMonth()+1,"月",
today.getDate(),"日",
d[today.getDay()+1],
"/font" );
/SCRIPT
/DIV/TD/TR TR TD bgcolor="#DFDFDF" DIV ALIGN="center"
SCRIPT LANGUAGE=JavaScript
!--
writeNextBirthday(blist)
// --
/SCRIPT/DIV/TD/TR /TABLE
你再贴这么多代码,我就费了你
