用户注册



邮箱:

密码:

用户登录


邮箱:

密码:
记住登录一个月忘记密码?

发表随想


还能输入:200字
云代码 - java代码库

表白

2018-05-11 作者: 秦lovely举报

[java]代码库

<body>
    <div id="mainDiv">
        <div id="content">
            <div id="code">
                <span class="comments">/**</span><br />
                <span class="space"/><span class="comments">* We are both Fudan SSers and programmers,</span><br />
                <span class="space"/><span class="comments">* so I write some code to celebrate our 1st anniversary.</span><br />
                <span class="space"/><span class="comments">*/</span><br />
                Boy i = <span class="keyword">new</span> Boy(<span class="string">"hackerzhou"</span>);<br />
                Girl u = <span class="keyword">new</span> Girl(<span class="string">"MaryNee"</span>);<br />
                <span class="comments">// Nov 2, 2010, I told you I love you. </span><br />
                i.love(u);<br />
                <span class="comments">// Luckily, you accepted and became my girlfriend eversince.</span><br />
                u.accepted();<br />
                <span class="comments">// Since then, I miss u every day.</span><br />
                i.miss(u);<br />
                <span class="comments">// And take care of u and our love.</span><br />
                i.takeCareOf(u);<br />
                <span class="comments">// You say that you won't be so easy to marry me.</span><br />
                <span class="comments">// So I keep waiting and I have confidence that you will.</span><br />
                <span class="keyword">boolean</span> isHesitate = <span class="keyword">true</span>;<br />
                <span class="keyword">while</span> (isHesitate) {<br />
                <span class="placeholder"/>i.waitFor(u);<br />
                <span class="placeholder"/><span class="comments">// I think it is an important decision</span><br />
                <span class="placeholder"/><span class="comments">// and you should think it over.</span><br />
                <span class="placeholder"/>isHesitate = u.thinkOver();<br />
                }<br />
                <span class="comments">// After a romantic wedding, we will live happily ever after.</span><br />
                i.marry(u);<br />
                i.liveHappilyWith(u);<br />
            </div>
            <div id="loveHeart">
                <canvas id="garden"></canvas>
                <div id="words">
                    <div id="messages">
                        Minyue, I have fallen in love with you for
                        <div id="elapseClock"></div>
                    </div>
                    <div id="loveu">
                        Love u forever and ever.<br/>
                        <div class="signature">- hackerzhou</div>
                    </div>
                </div>
            </div>
        </div>
        <div id="copyright">
            Inspired by <a href="http://www.openrise.com/lab/FlowerPower/">FlowerPower</a> project.<br />
            Copyright © 2011 <a href='http://hackerzhou.me'>hackerzhou.me</a> 2009-2011
        </div>
    </div>
    <script type="text/javascript">
        var offsetX = $("#loveHeart").width() / 2;
        var offsetY = $("#loveHeart").height() / 2 - 55;
        var together = new Date();
        together.setFullYear(2010, 10, 2);
        together.setHours(20);
        together.setMinutes(0);
        together.setSeconds(0);
        together.setMilliseconds(0);
         
        if (!document.createElement('canvas').getContext) {
            var msg = document.createElement("div");
            msg.id = "errorMsg";
            msg.innerHTML = "Your browser doesn't support HTML5!<br/>Recommend use Chrome 14+/IE 9+/Firefox 7+/Safari 4+";
            document.body.appendChild(msg);
            $("#code").css("display", "none")
            $("#copyright").css("position", "absolute");
            $("#copyright").css("bottom", "10px");
            document.execCommand("stop");
        } else {
            setTimeout(function () {
                startHeartAnimation();
            }, 5000);
 
            timeElapse(together);
            setInterval(function () {
                timeElapse(together);
            }, 500);
 
            adjustCodePosition();
            $("#code").typewriter();
        }
    </script>
</body>

[源代码打包下载]




网友评论    (发表评论)

共2 条评论 1/1页

发表评论:

评论须知:

  • 1、评论每次加2分,每天上限为30;
  • 2、请文明用语,共同创建干净的技术交流环境;
  • 3、若被发现提交非法信息,评论将会被删除,并且给予扣分处理,严重者给予封号处理;
  • 4、请勿发布广告信息或其他无关评论,否则将会删除评论并扣分,严重者给予封号处理。


扫码下载

加载中,请稍后...

输入口令后可复制整站源码

加载中,请稍后...