Yuren's Info Area
yurinfore
Yuren's Info Area is about »
tag cloud
- .net
- about:config
- acpi
- adobe
- android
- app centre
- app store
- appcentre
- apt
- apt-get
- arch
- artwork
- asus
- beagle
- beryl
- browser
- c#
- c++
- callback
- canonical
- chrome
- cinnamon
- compiz
- compiz fusion
- coscup
- css3
- dcraw
- deb
- debian
- deborphan
- desktop
- downthemall
- drbl
- droid
- eclipse
- editor
- eee-pc
- elantech
- eog
- evolution
- f-spot
- fast boot
- fedora
- firefox
- firefox os
- firegestures
- flash
- font
- foxconn
- g1
- gae
- gaia
- gdb
- geany
- gecko
- gesture
- gi
- gjs
- glib
- gmail
- gnome
- gnome-panel
- gnome-shell
- gnome-taiwan
- gnome.asia
- gnome3
- gobject
- gobject-introspection
- google calendar
- google chrome os
- google code search
- google desktop
- google docs
- google earth
- google maps
- google presentations
- google profile
- google reader
- google talk
- google-api-java-client
- graphviz
- gtk
- gtkorphan
- hacking thursday
- hardy
- hotkey
- html5
- ibus
- ibus-pinyin
- ibus-pinyin-bopomofo
- icos
- ifttt
- intel
- irc
- irssi
- jaiku
- jamei
- java
- javas
- javascript
- jenkins
- jserv
- jslinux
- jsmodem
- kalug
- kkbox
- laptop
- lazybuntu
- lazyeeepc
- lazyscripts
- lenny
- lftp
- libgtkembedmoz
- linux
- linux taiwan
- listview
- lively
- logitech
- logo
- lucid
- mac os
- mint
- moblin
- modem
- mouse
- ms windows
- music player
- mx510
- nikon d200
- node.js
- onx
- opcion
- open source
- openca
- openoffice.org
- openstreetmap
- palm
- picasa
- pidgin
- plymouth
- postgresql
- pull down refresh
- python
- qt
- qunit
- reactiveui
- remember the milk
- remix
- restful
- rpm
- rtm
- ruby
- ruby on rails
- screenshot
- seed
- seedkit
- sharp
- software
- software store
- sources.list
- squeeze
- ssh
- sshfs
- svg
- symbian
- tab
- tdd
- tero
- thinkpad
- todo
- topic
- tosres
- tossug
- touchpad
- trackpoint
- translation
- travis
- tunnel
- ubuntu
- ubuntu 8.04
- ubuntu 9.10
- unit test
- video
- vim
- virtualbox
- vpn
- wlot
- wpf
- x-window
- xandros
- xfce
- xinput
- xsplash
- xul
- yahoo pipes
- zenity
- 中文
- 富士康
- 拼音
- 注音
- 當兵
- 硬體
- 筆記
- 輸入法
- 高雄
» HTML5 mobile app 練習
這幾天在練習 HTML5 mobile app,決定找一個 Android 底下的 app 來重刻成 HTML5 版本,我挑的是 News & Weather 的天氣部分。

這是一個可以根據你現在地點給你當地天氣的 app,按下右邊靠近上面的驚歎號圖示可以看今天一整天的溼度以及溫度變化,在圖形上面用手指滑動可以看指定時間的溼度。
我找了一下如果要每個小時的溼度與溫度的 Weather API 大多都要錢的,所以最後我接了 World Weather Online 的 API, 但是圖表就換成接下來五天的天氣氣溫變化,當作練習就是了。
成果如下,他只能跑在 Firefox for Android 上面,我沒有針對 Chrome/Safari 等 webkit 系列調整。
作完之後有一些感想...
- 如果不考慮相容性,現在的 CSS3 真的很強大,以前很詭異的排版方法現在都變得好排多了,我連右上角驚歎號圖示按下去顯示另外一頁都是用 CSS3 完成的,不需要 javascript。
- CORS 我還是沒搞定,最後用比較醜的 JSONP 解決。
- SVG 雖然好用,不過看起來效能在 mobile 上面還無法接受,目前應該還是用 Canvas 比較好。
- CSS/SVG 的漸層效果在 Firefox For Android 上面看起來很差,不知道爲什麼。
Source code 我放在 github 上面,有興趣的參考參考。









