html 之前學習響應式的筆記

來源:互聯網
上載者:User

標籤:android   http   io   使用   java   sp   on   html   bs   

響應式的設計,根據使用者裝置的不同,使用者螢幕大小不同,提供不同的網頁設計
http://mediaqueri.es/
PhoneGap 使用
2,如何類比手機裝置
chome 瀏覽器 在32以上
裝置檢測
用 device.js
device.ipad(),device.mobile,
device.portrait(), 檢測裝置是豎直的
device. 檢測裝置是水平的
device.iphone 檢測裝置是否是蘋果手機
device.android() 檢測裝置是否是安卓手機
device.tablet() 檢測裝置是否是大手機(7寸以上)
實現跳轉:window.location = "";

檢測螢幕寬度,更換樣式表

javascript 得到頁面寬度
document.documentElement.clientWidth;
window.onrsize  window事件



window.onresize = gaibian;
視口, 就是螢幕寬度,尋找蘋果手機的寬度的時候,寬度居然是980;
視口讓我們學習響應式很不方便,

width = device.width  命令視口的寬度
initial-scale = 1.0 命令視口預設的
mini


css3中的媒體查詢,
media ="(min-width:600px;)"  簡稱 媒體查詢
min-width  小於等於
max-width  大於等於


流式布局 就是利用父盒子的百分比

html 之前學習響應式的筆記

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.