利用Dreamweaver CS5.5設計行動裝置網頁
智慧型手機竄紅、平板電腦普及、行動網路發達,讓上網不再是只需要宅在家裡才能做到的事情,不管是走路、等車、坐車、吃飯、蹲馬桶以及許多的時候,都可以利用這些裝置來進入網際網路的花花世界,所以許多的網站也針對這些行動裝置來製作獨立的頁面,甚至根據螢幕尺寸來最佳化頁面。
上面這兩張圖,就是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中除了提供多螢幕預覽的模式之外:
還可以針對不同的螢幕尺寸來設定該使用哪個CSS樣式表檔,只要按下多螢幕預覽上方的媒體查詢按鈕。
上面的範例是針對螢幕寬度小於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://careful-wolf-dc4vl0.mystrikingly.com/blog/1a958016b1d
Feel free to surf to my web blog :: PokerTube – Watch Free Poker Videos & TV Shows
비아그라 효과 있나요?
비아그라 효과: 남성 건강을 위한 해결책
https://xn--xy-o02ik82a7zcx14adgk.mystrikingly.com/blog/970a30fefdd
https://xn--ln-o02ik82aiqcqsko8mfg5a1sb.mystrikingly.com/blog/01fbe9736d0
Look into my website … Daycares popular listings
my web page :: Watch Free Poker Videos & TV Shows
my web blog; Daycare Near Me – Find The Best Daycares Near You
https://ocher-panda-dc4vlg.mystrikingly.com/blog/08819af25e0
my blog post; Watch Free Poker TV Shows
My web site :: PokerTube – Watch Free Poker Videos & TV Shows
https://competent-taro-dc4vl1.mystrikingly.com/blog/28d0d166588
https://telegra.ph/%EB%B9%84%EC%95%84%EA%B7%B8%EB%9D%BC-%EA%B5%AC%EB%A7%A4-%EC%8B%A0%EB%A2%B0%ED%95%A0-%EC%88%98-%EC%9E%88%EB%8A%94-%ED%8C%90%EB%A7%A4%EC%B2%98-%EC%B0%BE%EA%B8%B0-07-31
https://methodical-fish-dc4vlt.mystrikingly.com/blog/823cbfb6901
https://telegra.ph/%EB%B9%84%EC%95%84%EA%B7%B8%EB%9D%BC-%EA%B5%AC%EB%A7%A4-%EC%8B%9C-%EA%BC%AD-%EC%95%8C%EC%95%84%EC%95%BC-%ED%95%A0-%EB%B2%95%EC%A0%81-%EC%82%AC%ED%95%AD-07-23
Feel free to visit my web site … Dani
https://vocus.cc/article/669dbdd0fd8978000106f454
자주하는 질문
비아그라 구매에 관한 20개 자주하는 질문
Here is my web-site; Daycare Near Me
my website: Daycare Near Me
https://xn--xw-o02ik82a7zcx14adgk.mystrikingly.com/blog/eaa898642af
비아그라 지속시간
비아그라 효과 극대화: 지속시간 연장 팁
비아그라와 같은 처방전이 필요한 약물을 안전하게 온라인에서 구매하는 방법에 대한 가이드는 다음과 같습니다:
비아그라 구매 가이드: 안전한 온라인 구매법
My blog post; Site Poker
I truly love your website.. Excellent colors & theme. Did you make this website yourself? Please reply back as I’m trying to create my own website and would love to know where you got this from or what the theme is named. Appreciate it!
https://hardworking-owl-dc4vlt.mystrikingly.com/blog/5006b8c3495
https://telegra.ph/%EB%B9%84%EC%95%84%EA%B7%B8%EB%9D%BC-%EA%B5%AC%EB%A7%A4%EC%9D%98-%EB%B2%95%EC%A0%81-%EC%82%AC%ED%95%AD%EA%B3%BC-%EA%B7%9C%EC%A0%95-07-31
my blog charley brown childrens center
https://xn--hp-hd0j99gyns5zflam0o3rd.mystrikingly.com/blog/ed
https://xn--lw-o02ik82aiqcqsko8mfg5a1sb.mystrikingly.com/blog/b8da7672f66