利用Dreamweaver CS5.5設計行動裝置網頁
智慧型手機竄紅、平板電腦普及、行動網路發達,讓上網不再是只需要宅在家裡才能做到的事情,不管是走路、等車、坐車、吃飯、蹲馬桶以及許多的時候,都可以利用這些裝置來進入網際網路的花花世界,所以許多的網站也針對這些行動裝置來製作獨立的頁面,甚至根據螢幕尺寸來最佳化頁面。
![iPhone 臉書網站直式 iPhone 臉書網站直式](http://cloudlab.tw/wp/wp-content/uploads/1/2011/09/iphone_fb_v-200x300.jpg)
![iPhone 臉書網站橫式 iPhone 臉書網站橫式](http://cloudlab.tw/wp/wp-content/uploads/1/2011/09/iphone_fb_h-300x200.jpg)
上面這兩張圖,就是Facebook為了行動裝置而製作的頁面,左邊是iPhone直拿觀賞,右手邊則是橫拿,可以看到在左邊最上排只看到「個人檔案、訊息、更多」,右邊可看到「個人檔案、訊息、朋友、相片、更多」,橫拿比直拿多出了兩個選項,雖然只是小地方,但設計就是要掌握每一個細節,那我們該如何設計這樣的網頁呢?就讓我們慢慢來體驗吧!
很久很久以前在製作網頁的時候,我們可以在同一個頁面使用不同媒體的CSS樣式表來控制顯示內容,例如:
<link href="css/screen.css" rel="stylesheet" type="text/css" media="screen" /> <link href="css/handheld.css" rel="stylesheet" type="text/css" media="handheld" /> <link href="css/print.css" rel="stylesheet" type="text/css" media="print" />
上面的第一行是代表螢幕樣式、第二行為行動裝置樣式、第三行為列印樣式,不過目前有關行動裝置樣式已經因為時代的演進與科技的發達,已經瀕臨淘汰的邊緣了,現在我們製作行動裝置樣式,主要是靠裝置的螢幕寬度來決定不同的樣式表。
在Dreamweaver CS5.5中除了提供多螢幕預覽的模式之外:
![Dreamweaver CS5.5 多螢幕預覽 Dreamweaver CS5.5 多螢幕預覽](http://cloudlab.tw/wp/wp-content/uploads/1/2011/09/dw55-1-300x257.jpg)
![Dreamweaver CS5.5 多螢幕預覽介面 Dreamweaver CS5.5 多螢幕預覽介面](http://cloudlab.tw/wp/wp-content/uploads/1/2011/09/dw55-2-300x267.jpg)
還可以針對不同的螢幕尺寸來設定該使用哪個CSS樣式表檔,只要按下多螢幕預覽上方的媒體查詢按鈕。
![Dreamweaver CS5.5 媒體查詢 Dreamweaver CS5.5 媒體查詢](http://cloudlab.tw/wp/wp-content/uploads/1/2011/09/dw55-3-244x300.jpg)
上面的範例是針對螢幕寬度小於320像素的裝置使用phone.css,螢幕尺寸介於321像素~768像素之間的裝置使用tablet.css,加入了這樣的設定後在頁面內會多出兩段CSS的連結語法:
<link href="css/phone.css" rel="stylesheet" type="text/css" media="only screen and (max-width:320px)" /> <link href="css/tablet.css" rel="stylesheet" type="text/css" media="only screen and (min-width:321px) and (max-width:768px)" />
當然要看你在這兩個CSS中如何設定呈現頁面樣式囉!我的範例是在phone.css裡面將景點圖片的display設為none,另外要注意在<head></head>區段中要加入以下的語法:
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">
否則在手機橫向後頁面將會被放大,這樣我們的樣式表就會失效,瀏覽的效果可以參考下面的影片:
可以看到在320像素以下景點圖片會被隱藏,而超過這個大小圖片就會自動顯示,大家也可以自行用行動裝置瀏覽這個網址,也準備這個範例的原始檔讓大家下載研究。
https://gajweor.pixnet.net/blog/post/157629805
You really should join in a tournament for one of the best blogs over the internet. I’ll recommend this blog!
비아그라 복제약이랑 그냥 비아그라랑 별로 차이 없나요?
비아그라 복제약과 원본 비아그라: 차이와 주의사항
화이자 비아그라 구입
제네릭 대안보다 화이자 비아그라 선택의 이점
https://xn--ku-ro2i3ru49at1jokm7ma.mystrikingly.com/blog/73f9b74c405
https://funny-owl-dc4vll.mystrikingly.com/blog/4d2be1601a5
https://xn--za-hd0j5a097plop.mystrikingly.com/blog/815c1aa8394
magnificent post, very informative. I wonder why the other specialists of this sector do not notice this. You should continue your writing. I’m sure, you’ve a great readers’ base already!
https://practical-hawk-dc4vl1.mystrikingly.com/blog/98fd3c0b947
https://xn--zd-hd0j5a097plop.mystrikingly.com/blog/114d07250da
연속으로 하는 법
연속으로 하는 법: 몇 기지 팁
비아그라 먹으면 안되는 사람
비아그라를 먹을 수 없는
This is a great blog” and i want to visit this every day of the week .
https://xn--xr-o02ik82a7zcx14adgk.mystrikingly.com/blog/551c5cdf1df
https://www.xiuwushidai.com/home.php?mod=space&uid=1476171
finax price – buy finasteride without prescription buy alfuzosin cheap
https://ivory-platypus-dc4vlr.mystrikingly.com/blog/f5da7dcdf43
https://optimistic-wombat-dc4vlt.mystrikingly.com/blog/ffac0f6219d
https://inky-lark-dc4vlz.mystrikingly.com/blog/17d9b1a7a56
비아그라 시알리스 효능 비교하면
비아그라와 시알리스의 효과 비교: 어떤 것이 더 나은 선택일까?
https://t.me/iv?url=https://bio.link/koaio
It’s hard to find experienced people about this subject, however, you sound like you know what you’re talking about! Thanks
https://xn--2o2bq0ed2wmlf.mystrikingly.com/blog/f11736a6346
https://naveridbuy.blogspot.com/2024/07/blog-post_38.html
https://medium.com/@1kelly76/%EB%B9%84%EC%95%84%EA%B7%B8%EB%9D%BC%EB%A5%BC-%EC%B2%98%EC%9D%8C-%EA%B5%AC%EB%A7%A4%ED%95%98%EB%8A%94-%EC%82%AC%EB%9E%8C%EC%9D%84-%EC%9C%84%ED%95%9C-%EA%B0%80%EC%9D%B4%EB%93%9C-69df0d4a5084
https://xn--zy-hd0j5a097plop.mystrikingly.com/blog/822fecf23c8
This excellent website really has all the info I needed concerning this subject and didn’t know who to ask.
There is definately a lot to know about this subject. I like all of the points you have made.
After I initially left a comment I appear to have clicked the -Notify me when new comments are added- checkbox and from now on whenever a comment is added I recieve four emails with the exact same comment. Perhaps there is a way you are able to remove me from that service? Kudos.
You’ve made some decent points there. I looked on the net for additional information about the issue and found most individuals will go along with your views on this site.