技术男用来对妹子表白的百度首页
2023-06-13 09:15:39 时间
有一天突发奇想,我要是能用我学的程序员技术给女朋友来表白的话,那岂不是高端大气上档次。
想到就立马去做,首先想到的是更改hosts文件,将浏览器的主页更改为自己设计的网页。
国内的女同学一般用百度首页,于是我就自己仿做了一个百度首页,具体的效果如下面:
是不是看起来高大上,当然最后我失败了,程序员怎么可能会有女朋友呢?
但是为了广大?潘颗笥训母@??蚁衷诮?庑┐?敫??隼矗?退阌幸桓鋈顺晒α耍?乙彩巧畈毓τ朊??/p>
其中更改hosts文件的步骤请自行百度,这里为止不够就不详解了。
自己写的百度源码:
<style>
html,body{height:100%}html{overflow-y:auto}#wrapper{position:relative;_position:;min-height:100%}#content{padding-bottom:100px;text-align:center}#ftCon{height:100px;position:absolute;bottom:44px;text-align:center;width:100%;margin:0
auto;z-index:0;overflow:hidden}#ftConw{width:720px;margin:0auto}
body{font:12pxarial;text-align:left;background:#fff}
body,p,form,ul,li{margin:0;padding:0;list-style:none}
body,form,#fm{position:relative}td{text-align:left}img{border:0}a{color:#00c}a:active{color:#f60}
.bg{background-image:url(http://s1.bdstatic.com/r/www/cache/static/global/img/icons_aea40f46.png);background-repeat:no-repeat;_background-image:url(http://s1.bdstatic.com/r/www/cache/static/global/img/icons_cfa0bb3b.gif)}
.c-icon{display:inline-block;width:14px;height:14px;vertical-align:text-bottom;font-style:normal;overflow:hidden;background:url(http://s1.bdstatic.com/r/www/cache/static/global/img/icons_aea40f46.png)no-repeat00;_background-image:url(http://s1.bdstatic.com/r/www/cache/static/global/img/icons_cfa0bb3b.gif)}.c-icon-triangle-down-blue{background-position:-480px
-24px}.c-icon-chevron-unfold2{background-position:-504px-24px}#u{color:#999;padding:4px
10px5px0;text-align:right}#ua{margin:05px}#u.reg{margin:0}#m{width:720px;margin:0
auto}#nva,#nvb,.btn,#lk{font-size:14px}#fm{padding-left:130px;text-align:left;z-index:1}input{border:0;padding:0}#nv{height:19px;font-size:16px;margin:0
04px;text-align:left;text-indent:137px}.s_ipt_wr{width:468px;height:30px;display:inline-block;margin-right:5px;background-position:0
-288px;border:1pxsolid#b6b6b6;border-color:#9a9a9a#cdcdcd#cdcdcd#9a9a9a;vertical-align:top}.s_ipt{width:458px;height:22px;font:14px/22px
arial;margin:5px007px;background:#fff;outline:0;-webkit-appearance:none}.s_btn{width:95px;height:32px;padding-top:2px\9;font-size:14px;background-color:#ddd;background-position:0
-240px;cursor:pointer}.s_btn_h{background-position:-240px-240px}.s_btn_wr{width:97px;height:34px;display:inline-block;background-position:-120px
-240px;*position:relative;z-index:0;vertical-align:top}#lgimg{vertical-align:top;margin-bottom:3px}#lk{margin:33px
0}#lkspan{font:14px"宋体"}#lm{height:60px;line-height:15px}#lh{margin:16px
05px;word-spacing:3px}.tools{position:absolute;top:-4px;*top:10px;right:7px}#mHolder{width:62px;position:relative;z-index:296;display:none}#mCon{height:18px;line-height:18px;position:absolute;cursor:pointer}#mCon
span{color:#00c;cursor:default;display:block}#mCon.hw{text-decoration:underline;cursor:pointer;display:inline-block}#mCon
.pinyin{display:inline-block}#mCon.c-icon-chevron-unfold2{margin-left:5px}#mMenu
a{width:100%;height:100%;display:block;line-height:22px;text-indent:6px;text-decoration:none;filter:none\9}#mMenu,#user
ul{box-shadow:1px1px2px#ccc;-moz-box-shadow:1px1px2px#ccc;-webkit-box-shadow:1px
1px2px#ccc;filter:progid:DXImageTransform.Microsoft.Shadow(Strength=2,Direction=135,Color="#cccccc")\9}#mMenu{width:56px;border:1px
solid#9b9b9b;list-style:none;position:absolute;right:27px;top:28px;display:none;background:#fff}#mMenu
a:hover{background:#ebebeb}#mMenu.ln{height:1px;background:#ebebeb;overflow:hidden;font-size:1px;line-height:1px;margin-top:-1px}#cp,#cp
a{color:#666}#seth{display:none;background:url(#default#homepage)}#setf{display:none}#sekj{margin-left:14px}#shouji{margin-right:14px}#u
.last{margin-right:0}#u.un{font-weight:bold;margin-right:5px}#uul{width:100%;background:#fff;border:1px
solid#9b9b9b}#uli{height:25px}#ulia{width:100%;height:25px;line-height:25px;display:block;text-align:left;text-decoration:none;text-indent:6px;margin:0;filter:none\9}#u
lia:hover{background:#ebebeb}#uli.nl{border-top:1pxsolid#ebebeb}#user_center{position:relative;display:inline-block}#user_center
.user_center_btn{margin-right:5px}.userMenu{width:64px;position:absolute;right:7px;_right:2px;top:15px;top:14px\9;*top:15px;padding-top:4px;display:none;*background:#fff}#user{position:relative;display:inline-block}
</style>
<style>
/*
我的logo样式
*/
#m{position:relative;padding:50px000;}
#newYearEve{height:15px;position:absolute;top:250px;left:130px;width:510px;}
#newYearEveli{cursor:pointer;width:20px;height:15px;margin:021px00;float:left;}
#newYearEve.icon-newyear0{background:url("//img.jbzj.com/file_images/article/201407/mylove.png")no-repeatcentercenter;}
#newYearEve.month-next{display:none!important;}
#newYearEve.icon-newyear1{background:url("//img.jbzj.com/file_images/article/201407/mylove01.png")no-repeatcentercenter;}
#newYearEveli:hover{background:url("//img.jbzj.com/file_images/article/201407/mylove.gif")no-repeat-00;}
#m{position:relative;}
#play{position:absolute;top:135px;left:348px;width:25px;height:25px;cursor:pointer;}
#newYearEve.icon-newyear2,#newYearEve.icon-newyear1:hover{background:url("//img.jbzj.com/file_images/article/201407/mylove01.png")no-repeatcentercenter;}
#newYearKw{color:#e203a9;position:absolute;top:212px;left:135px;width:300px;height:20px;color:#897883;z-index:100;font-family:"微软雅黑";text-align:left;font-weight:700;font-size:16px;overflow:hidden;}
#newYearKw i,#newYearKw img{font-style:normal;position:absolute;width:20px;height:20px;top:0;}
#newYearKw .img01{left:0px;}
#newYearKw .img02{left:180px;}
#newYearKw .c1{color:#e203a9;left:20px;}
#newYearKw .c2{color:#e203a9;left:40px;}
#newYearKw .c3{color:#b60175;left:60px;}
#newYearKw .c4{color:#b60175;left:80px;}
#newYearKw .c5{color:#f460af;left:100px;}
#newYearKw .c6{color:#f460af;left:120px;}
#newYearKw .c7{color:#fd98a5;left:140px;}
#newYearKw .c8{color:#fec8db;left:160px;}
#newYearKw .c9{color:#fec8db;left:180px;}
#newYearKw .c11{color:#fec8db;}
#newYearKw .c12{color:#fec8db;}
#newYearKw .c13{color:#fec8db;}
#newYearKw .c14{color:#fec8db;}
.word-box{position:relative;width:300px;height:20px;}
</style>
<divid="content">
<divid="m">
<pid="lg">
<imgsrc="//img.jbzj.com/file_images/article/201407/mylove_logo.png"width="270"height="129"/>
</p>
<pid="nv">
<ahref="http://news.baidu.com/"rel="externalnofollow"name="tj_news">
新 闻
</a>
<b>
网 页
</b>
<ahref="http://tieba.baidu.com/"rel="externalnofollow"name="tj_tieba">
贴 吧
</a>
<ahref="http://zhidao.baidu.com/"rel="externalnofollow"name="tj_zhidao">
知 道
</a>
<ahref="http://music.baidu.com/"rel="externalnofollow"name="tj_mp3">
音 乐
</a>
<ahref="http://image.baidu.com/"rel="externalnofollow"name="tj_img">
图 片
</a>
<ahref="http://v.baidu.com/"rel="externalnofollow"name="tj_video">
视 频
</a>
<ahref="http://map.baidu.com/"rel="externalnofollow"name="tj_map">
地 图
</a>
</p>
<divid="fm">
<formname="f"action="http://www.baidu.com/s"target="_blank">
<spanclass="bgs_ipt_wr">
<inputtype="text"name="wd"id="kw"maxlength="100"class="s_ipt"autocomplete="off"/>
</span>
<inputtype="hidden"name="rsv_bp"value="0"/>
<inputtype="hidden"name="ch"value=""/>
<inputtype="hidden"name="tn"value="sitehao123"/>
<inputtype="hidden"name="bar"value=""/>
<inputtype="hidden"name="rsv_spt"value="3"/>
<inputtype="hidden"name="ie"value="utf-8"/>
<spanclass="bgs_btn_wr">
<inputtype="submit"value="百度一下"id="su"class="bgs_btn"onmousedown="this.className="bgs_btns_btn_h""onmouseout="this.className="bgs_btn""/>
</span>
<divid="sd_1386659528033"style="display:none;">
</div>
</form>
<spanclass="tools">
<spanid="mHolder">
<divid="mCon">
<span>
输入法
</span>
</div>
</span>
</span>
</div>
<ulclass="logo-new-year"id="newYearEve"><liclass="icon-newyear0"i="0"></li><liclass="icon-newyear1"i="1"></li></ul>
<divid="play"style="display:none;"></div>
<divid="newYearKw"style="width:0px;">
<divclass="word-box">
<imgsrc="//img.jbzj.com/file_images/article/201407/mylove.gif"class="img01"/>
<iclass="c1">亲</i>
<iclass="c2">爱</i>
<iclass="c3">的</i>
<iclass="c4">,</i>
<iclass="c5">嫁</i>
<iclass="c6">给</i>
<iclass="c7">我</i>
<iclass="c8">吧</i>
<imgsrc="//img.jbzj.com/file_images/article/201407/mylove.gif"class="img02"/>
</div>
</div>
</div>
</div>
<scripttype="text/javascript">//<![CDATA[
varnewYearEve=newYearEve||{};
newYearEve.DOM=document;
newYearEve.box=newYearEve.DOM.getElementById("newYearEve");
newYearEve.kw=newYearEve.DOM.getElementById("kw");
newYearEve.newYearKw=newYearEve.DOM.getElementById("newYearKw");
//newYearEve.logo=newYearEve.DOM.getElementById("lg");
//newYearEve.playDOM=newYearEve.DOM.getElementById("play");
newYearEve.num=-1;
newYearEve.time=0;
newYearEve.wordWidth=300;
newYearEve.wordW=0;
newYearEve.newDay=false;
newYearEve.dataArr=[{
keyword:"2012年5月18日第一次见面你给我的感觉有些特别"
},{
keyword:"2012年6月5日我们在一起了,从此这个平淡的日子对我们有了特殊的意义"
},{
keyword:"2012年8月20日第一次吵架让你伤心了对不起"
},{
keyword:"2012年10月1日香格里拉属于我们的第一次旅行"
},{
keyword:"2012年12月24日平安夜我们一起做了棵圣诞树"
},{
keyword:"2013年2月14日第一个情人节虽然俗气还是送了玫瑰给你"
},{
keyword:"2013年3月17日陪你过的第一个生日"
},{
keyword:"2013年6月1日一起过儿童节也很开心"
},{
keyword:"2013年6月5日一周年纪念日感谢有你陪在身边的一年"
},{
keyword:"2013年8月4日带你去吃我的家乡菜,看你吃得好开心"
},{
keyword:"2013年9月19日中秋节第一次见你爸妈有点紧张"
},{
keyword:"2013年12月31日希望以后每一次都是我陪你跨年。。。"
}
];
newYearEve.createHtml=function(num){
varh="";
varn=1;
num=num-0;
if(num<n+1){
switch(num){
case0:
h="<liclass="icon-newyear2"i="0">";
break;
case1:
h="<liclass="icon-newyear0"i="0"></li><liclass="icon-newyear1"i="1"></li>";
break;
}
}else{
for(vari=0;i<num-n;i++){
h+="<liclass="icon-no"i=""+i+"">";
}
for(vari=num-n;i<num+1;i++){
varc="icon-newyear"+(i+n-num);
h+="<liclass=""+c+""i=""+i+"">";
}
}
if(newYearEve.box){
newYearEve.box.innerHTML=h;
}
newYearEve.kw.value=newYearEve.dataArr[num].keyword;
}
newYearEve.animate=function(){
if(newYearEve.num<11){
newYearEve.num++;
newYearEve.createHtml(this.num);
}
newYearEve.time=setTimeout(function(){
if(newYearEve.num<11){
newYearEve.animate();
}else{
newYearEve.kw.value="";
newYearEve.box.innerHTML="";
newYearEve.wordAnimate();
}
},3000);
}
newYearEve.wordAnimate=function(){
if(newYearEve.wordW<newYearEve.wordWidth){
newYearEve.wordW=newYearEve.wordW+1;
newYearEve.newYearKw.style.width=newYearEve.wordW+"px";
setTimeout(function(){
newYearEve.wordAnimate();},16);
}else{
newYearEve.rePlay();
}
}
newYearEve.rePlay=function(num){
newYearEve.time=setTimeout(function(){
newYearEve.wordW=0;
newYearEve.newYearKw.style.width=newYearEve.wordW+"px";
newYearEve.kw.value="";
newYearEve.num=-1;
newYearEve.box.innerHTML="";
newYearEve.animate();
},3000);
}
newYearEve.box.onclick=function(event){
vare=event.target||event.srcElement;
vari=e.getAttribute("i");
if(i!==null){
newYearEve.newYearKw.style.width="0px";
newYearEve.kw.value=newYearEve.dataArr[i].keyword;
newYearEve.clickNum=i;
newYearEve.createHtml(newYearEve.clickNum);
clearTimeout(newYearEve.time);
newYearEve.time=setTimeout(function(){
//newYearEve.createHtml(newYearEve.num);
newYearEve.num=newYearEve.num==11?10:newYearEve.num;
newYearEve.animate();
//newYearEve.kw.value=newYearEve.user||"";
},3000)
}
}
newYearEve.animate();
//newYearEve.wordAnimate();
//]]></script>
相关文章
- 技术演练,咱们云游台湾吧,百度地图都被搜崩溃了
- 百度CTO王海峰:亚洲丰富实践场景推动AI技术落地探索
- 网站底部添加“百度收录数量”精准代码 和“搜狗收录数量”精准代码
- 百度升级蓝天算法加强“站点构造目录发布低质内容”识别能力
- 如何0代码、快速定制企业级NLP模型?百度技术大咖在线解析,可报名
- 百度、阿里、中国工商银行、华为低代码最新技术动态一览 | GMTC
- 百度语音技术重要进展:基于历史信息抽象的流式截断conformer建模SMLTA2
- 百度站长推出 WordPress 结构化数据插件,可以自动推送Sitemap,优化内容收录
- iOS开发—百度地图配置流程,2.6.0 版本 支持64位详解手机开发
- Linux下载百度云:实现系统上的云盘体验(linux下载百度网盘)
- 学习马哥Linux,通过百度云轻松享受自由(马哥linux百度云)
- 如何评价百度刚刚开源的Paddle平台?
- 百度在医疗上的两种画风 | 2016 影响因子
- 百度云进化了!快来试试Linux版(百度云有linux版)
- SQL Server与百度云:云端数据库管理新解决方案(sqlserver百度云)
- 极客时间使用百度云,助你掌握Redis技术(极客时间百度云Redis)
- Oracle技术精要百度云存储下载一步搞定(oracle书百度云)
- 百度发布DuerOS智慧芯片 让你的设备“可对话”
- 解密百度智能音箱小度:“听清、听懂、满足”背后的技术和能力
- 投入千亿研发的“广告公司”?百度的估值逻辑该变了
- JQuery+JS实现仿百度搜索结果中关键字变色效果