One day I had a sudden idea, if I could use the programmer skills I learned to confess to my girlfriend, wouldn’t it be high-end, elegant and up-to-date?
I think of it and do it immediately. The first thing I think of is to change the hosts file and change the home page of the browser to the web page I designed.
Domestic female students usually use Baidu homepage, so I imitated a Baidu homepage myself, and the specific effects are as follows:
Does it look tall and outstanding? Of course, I failed in the end. How could a programmer have a girlfriend?
But for the benefit of my silk friends, I now post these codes. Even if one person succeeds, I will still hide my merits and fame.
Please use Baidu to change the hosts file. This is not enough.
Baidu source code written by myself:
The code copy is as follows:
<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:0 auto}
body{font:12px arial;text-align:left;background:#ffff}
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-repeat 0 0;_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
10px 5px 0;text-align:right}#ua{margin:0 5px}#u .reg{margin:0}#m{width:720px;margin:0
auto}#nv a,#nv b,.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
0 4px;text-align:left;text-indent:137px}.s_ipt_wr{width:468px;height:30px;display:inline-block;margin-right:5px;background-position:0
-288px;border:1px solid #b6b6b6;border-color:#9a9a #cdcdcd #cdcdcd #9a9a9a;vertical-align:top}.s_ipt{width:458px;height:22px;font:14px/22px
arial;margin:5px 0 0 7px;background:#ffff;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}#lg img{vertical-align:top;margin-bottom:3px}#lk{margin:33px
0}#lk span{font:14px "安体"}#lm{height:60px;line-height:15px}#lh{margin:16px
0 5px;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:1px 1px 2px #ccc;-moz-box-shadow:1px 1px 2px #ccc;-webkit-box-shadow:1px
1px 2px #ccc;filter:progid:DXImageTransform.Microsoft.Shadow(Strength=2,Direction=135,Color="#ccccccc")/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}#u ul{width:100%;background:#fff;border:1px
solid #9b9b9b}#u li{height:25px}#u li a{width:100%;height:25px;line-height:25px;display:block;text-align:left;text-decoration:none;text-indent:6px;margin:0;filter:none/9}#u
li a:hover{background:#ebebeb}#u li.nl{border-top:1px solid #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>
/*
My logo style
*/
#m{position: relative;padding: 50px 0 0 0;}
#newYearEve{height:15px;position: absolute;top:250px;left:130px;width:510px;}
#newYearEve li{cursor: pointer;width:20px;height:15px;margin:0 21px 0 0;float: left;}
#newYearEve .icon-newyear0{background: url("//files.VeVB.COM/file_images/article/201407/mylove.png") no-repeat center center;}
#newYearEve .month-next{display: none!important;}
#newYearEve .icon-newyear1{background: url("//files.VeVB.COM/file_images/article/201407/mylove01.png") no-repeat center center;}
#newYearEve li:hover{background: url("//files.VeVB.COM/file_images/article/201407/mylove.gif") no-repeat -0 0; }
#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("//files.VeVB.COM/file_images/article/201407/mylove01.png") no-repeat center center;}
#newYearKw {color:#e203a9;position:absolute;top:212px;left:135px;width:300px;height:20px;color:#897883;z-index:100;font-family: "Microsoft Yahei";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>
<div id="content">
<div id="m">
<p id="lg">
<img src="//files.VeVB.COM/file_images/article/201407/mylove_logo.png"/>
</p>
<p id="nv">
<a href="http://news.baidu.com/" rel="external nofollow" name="tj_news">
news
</a>
<b>
Web page
</b>
<a href="http://tieba.baidu.com/" rel="external nofollow" name="tj_tieba">
Post it
</a>
<a href="http://zhidao.baidu.com/" rel="external nofollow" name="tj_zhidao">
Know
</a>
<a href="http://music.baidu.com/" rel="external nofollow" name="tj_mp3">
music
</a>
<a href="http://image.baidu.com/" rel="external nofollow" name="tj_img">
picture
</a>
<a href="http://v.baidu.com/" rel="external nofollow" name="tj_video">
video
</a>
<a href="http://map.baidu.com/" rel="external nofollow" name="tj_map">
map
</a>
</p>
<div id="fm">
<form name="f" action="http://www.baidu.com/s" target="_blank">
<span>
<input type="text" name="wd" id="kw" maxlength="100" autocomplete="off"/>
</span>
<input type="hidden" name="rsv_bp" value="0"/>
<input type="hidden" name="ch" value=""/>
<input type="hidden" name="tn" value="sitehao123"/>
<input type="hidden" name="bar" value=""/>
<input type="hidden" name="rsv_spt" value="3"/>
<input type="hidden" name="ie" value="utf-8"/>
<span>
<input type="submit" value="Baidu" id="su" onmousedown="this.className='bg s_btn s_btn_h'" onmouseout="this.className='bg s_btn'"/>
</span>
<div id="sd_1386659528033" style="display: none;">
</div>
</form>
<span>
<span id="mHolder">
<div id="mCon">
<span>
Input method
</span>
</div>
</span>
</span>
</div>
<ul id="newYearEve"><li i="0"></li><li i="1"></li></ul>
<div id="play" style="display:none;"></div>
<div id="newYearKw">
<div>
<img src="//files.VeVB.COM/file_images/article/201407/mylove.gif"/>
<i>Dear</i>
<i>Love</i>
<i>'s</i>
<i>,</i>
<i>Marry</i>
<i>Give</i>
<i>I</i>
<i>Bar</i>
<img src="//files.VeVB.COM/file_images/article/201407/mylove.gif"/>
</div>
</div>
</div>
</div>
<script type="text/javascript">//< ![CDATA[
var newYearEve = 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: "You gave me a special feeling when I first met on May 18, 2012"
}, {
keyword: "We were together on June 5, 2012, and since then this ordinary day has a special meaning for us"
}, {
keyword: "The first quarrel on August 20, 2012 made you sad and sorry"
}, {
keyword: "Shangri-La's first trip on October 1, 2012"
}, {
keyword: "We made a Christmas tree together on Christmas Eve, December 24, 2012"
}, {
keyword: "I still give you roses on the first Valentine's Day on February 14, 2013"
}, {
keyword: "March 17, 2013 I celebrated your first birthday"
}, {
keyword: "I'm also very happy to celebrate Children's Day together on June 1, 2013"
}, {
keyword: "Thank you for the year you have been by your side on the first anniversary of June 5, 2013"
}, {
keyword: "I will take you to eat my hometown food on August 4, 2013, and see you have a great time"
}, {
keyword: "I was a little nervous when I first met your parents during the Mid-Autumn Festival on September 19, 2013"
}, {
keyword: "December 31, 2013 I hope I will accompany you to celebrate the New Year every time from now on... "
}
];
newYearEve.createHtml = function(num){
var h = '';
var n = 1;
num=num-0;
if(num<n+1){
switch(num){
case 0:
h='<li i="0">';
break;
case 1:
h='<li i="0"></li><li i="1"></li>';
break;
}
}else{
for(var i = 0 ;i < num-n;i++){
h+='<li i="'+i+'">';
}
for(var i = num-n;i < num+1;i++ ){
var c = 'icon-newyear'+(i+n-num);
h+='<li 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){
var e = event.target||event.srcElement;
var i = 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>