Sunday, February 27, 2011

Plants vs Zombies soundtrack

Plants vs Zombies is my favorite game recently. What fascinates me most is its graphic design and music. The music is from Laura Shigihara, from Wiki I learned that she wants to mix in melodic tunes and funky beats! One of my favorite song in this game is its main menu background music. It is:

I like it especially from 0:35!

This is one is also good. 好鬼得意!

Thursday, February 10, 2011

Scaling for IE/Chrome/Firefox/Safari

I want a scaling that works for all above browsers. I end up with two separate style sheets, one for IE, and one for the rest browsers. And I did something like this:

This is sample text before scale
This is sample text after scale
<div class="myclass">This is sample text</div>
<style type="text/css">
.myclass {
    width: 100%;
    background: #ECECEC;
    font: bold 24px Arial;
}
</style>

<!--[if IE]>
<style type="text/css">
.myclass {
    zoom: 0.6;
}
</style>
<![endif]-->

<!--[if !IE]>-->
<style type="text/css">
.myclass {
    -moz-transform: scale(0.6);
    -webkit-transform: scale(0.6);
}
</style>
<!--<![endif]-->

The css 'zoom' would work for IE and Safari. 'zoom' scales element to the top left of element, and '-moz-transform' and '-webkit-transform' scales to the center. The 'position' property could be further adjusted in browser specific styles so that all browsers display the element at exactly same position after scale!

Conditional comments

Conditional comments only work for IE, but it can be used for deciding whether the browser is IE or not, and include browser specific style sheets.

<!--[if IE]>
do something for IE
<![endif]-->
<!--[if !IE]>-->
do something for other browsers
<!--<![endif]-->

Reference: http://www.quirksmode.org/css/condcom.html

Chrome minimum font size

I find my chrome failed to display my css font size settings. I learned that chrome has a default minimum font size setting, and the solution is to add below syntax:

-webkit-text-size-adjust:none;

Friday, January 14, 2011

天梯 - 釗峰

《天梯》

主唱:釗峰@C AllStar
作曲:賴映彤@groovision
填詞:鍾晴
編曲:Adrian Chan@Sense &賴映彤@groovision
監製:簡@groovision

如可 找個荒島
向未來避開生活中那些苦惱
如冬天欠電爐 雙手擁抱 可跟天對賭

無論有幾高 就如絕路
隔絕塵俗只想要跟你可終老
來跨出那地圖 不需好報 都只想你好

能共你 沿途來爬天梯 不用忌諱
中傷流言全悍衛
留住你 旁人如何話過不可一世
問我亦無愧 有你可失去我一切

幾多對 持續愛到幾多歲
當生命 仍能為你豁出去
千夫所指裡 誰理登不登對
仍挽手歷盡在世間興衰

幾多對 能悟到幾多精髓 能撐 下去
竭力也要為愛盡瘁 抱緊一生未覺累
前方 仍然大霧
到懸崖或海邊也許永不知道
能相擁到白頭 一起偕老 不跟天鬥高

前面有幾高 一片荒土
每步隨著攀登叫雙手都粗糙
從崎嶇這路途 開墾給你 可走得更好

能共你 沿途來爬天梯 黑夜亦亮麗
於山頭同盟洪海中發誓
留住你 旁人如何 話過不可一世
問我亦無愧 有你可以 拆破這天際

幾多對 持續愛到幾多歲
當生命 仍能為你豁出去
千夫所指裡 誰理登不登對
仍挽手歷盡在世間興衰

幾多對 能悟到幾多精髓 能撐 下去
竭力也要為愛盡瘁 抱緊一生未覺累

握著手 而幸福包圍泥牆簡陋
牽著走 懷著勇氣至愛得永久

幾多對 持續愛到幾多歲
不轟烈 如何做世界之最
千夫所指裡 誰理登不登對
仍挽手歷盡在世間興衰
幾多對 能悟到幾多精髓 能撐 下去
竭力也要為愛盡瘁 抱緊一生未覺累

幾多對 持續愛到幾多歲
當生命 仍能為你豁出去

Friday, December 24, 2010

林俊傑 - 熟能生巧

作詞:林秋離 作曲:林俊傑
醒著像睡著 躺著像思考 神魂顛倒
感情太單調 竟然是煩惱 如何是好
也許來陣風雨 花謝滿地
黯然神傷的困擾
可以刺激那顆 渾渾噩噩
失去了烈火 激情的大腦
吹風就感冒 淋雨就發燒 有愛就好
#我不再逃 空虛日子 這一路都在熬
也許愛情就是熟能生巧
你絕對想不到我多渴望
讓生活染上一些顏料
是紅橙黃或藍靛紫都好
一圈一圈的圍繞
終於能自在的坦誠說愛你
火一點就燃燒
怎麼刺激那顆 渾渾噩噩
失去了烈火 激情的大腦
吹風就感冒 淋雨就發燒 有愛就好

Tuesday, November 23, 2010

jQuery

jQuery小練習。下拉選單或點圖可以變換人物,下方的文字也會跟著變動。都在client-side完成。