利用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像素以下景點圖片會被隱藏,而超過這個大小圖片就會自動顯示,大家也可以自行用行動裝置瀏覽這個網址,也準備這個範例的原始檔讓大家下載研究。
Если вы искали где отремонтировать сломаную технику, обратите внимание – сервисный центр в екб
Katharine Shilcutt of the Houston Press acknowledged that some residents believed that the opening of 610 marked the beginning of South Park’s decline.
1884. p. 142. Retrieved 7 April 2022 – by way of Undertaking Gutenberg.
Make sure you visit the university during a week when classes are in session so you can get a taste of what life on the campus is actually like.
Если вы искали где отремонтировать сломаную технику, обратите внимание – профи спб
This web page was final edited on sixteen August 2023, at 17:25 (UTC).
Fantastic goods from you, man. I’ve understand your stuff previous to and you are just too fantastic. I actually like what you have acquired here, certainly like what you are saying and the way in which you say it. You make it entertaining and you still care for to keep it wise. I can’t wait to read far more from you. This is really a terrific site.
Профессиональный сервисный центр по ремонту радиоуправляемых устройства – квадрокоптеры, дроны, беспилостники в том числе Apple iPad.
Мы предлагаем: ремонт квадрокоптеров в москве и московской области
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
Если вы искали где отремонтировать сломаную технику, обратите внимание – ремонт бытовой техники
Hi, I do believe this is an excellent web site. I stumbledupon it 😉 I am going to revisit yet again since i have bookmarked it. Money and freedom is the greatest way to change, may you be rich and continue to help other people.
Engineering has always been right now there in making premature ejaculation treatment existence connected with men and women easier. In truth, on account of engineering the entire world regarding inner thoughts in addition has already been overcome. Don’t attempt to assume dirty below folks. What exactly I’m talking about could be the adore connection that may take place through online dating sites in addition to talking bedrooms or even software for instance ICQ, LIVE MESSENGER as well as MIRC.
Check out my site Find top-rated certified Daycares in your area
Профессиональный сервисный центр по ремонту планетов в том числе Apple iPad.
Мы предлагаем: сервис по ремонту ipad
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
my blog Daycare Near Me
my web site; Daycares popular listings
Feel free to visit my page … Daycare Near Me
BBB(low) or higher. Bonds rated BB(high) and below are considered to be speculative grade, sometimes also referred to as “junk” bonds.
This is the right website for anyone who hopes to understand this topic. You know so much its almost tough to argue with you (not that I actually will need to…HaHa). You certainly put a new spin on a topic that has been written about for many years. Excellent stuff, just great.
National Trails Training Partnership.
In the end the property was purchased by a developer for little more than the original US$65,000, but 8 years of appreciation later.
https://hardworking-swam-dc4vls.mystrikingly.com/blog/c8e62045588
Was it not for volatility, we would all just be better off investing our accounts in an index and waiting for a slow steady move to create a long-term gain.
The corporate launched the gadget with a discounted supply to the primary a thousand purchasers, which resulted in a stampede within the capital through which a number of folks were injured.
Individually, in Could 2023, the financial institution agreed to pay $1 billion to settle a shareholder class-motion suit.
The same task can be done with ultrasonic welding in less than a second.
Also visit my web page – Daycares By Category
https://forum.liquidbounce.net/user/stine
Feel free to visit my web site Find top-rated certified Daycares in your area
Профессиональный сервисный центр по ремонту ноутбуков и компьютеров.дронов.
Мы предлагаем:срочный ремонт ноутбуков в москве
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
Профессиональный сервисный центр по ремонту бытовой техники с выездом на дом.
Мы предлагаем:сервис центры бытовой техники петербург
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!