We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
物理像素(physical pixel)也可以叫做设备像素(dp:device pixel)
CSS 像素也可以叫做逻辑像素(logical pixel),还可以叫做设备独立像素(dip:device independent pixel)
width=device-width与initial-scale=1效果一样 maximum-scale=1,minimum-scale=1与user-scalable=no效果一样
width=device-width
initial-scale=1
maximum-scale=1,minimum-scale=1
user-scalable=no
获取视口 viewport 宽度:
var viewWidth = document.documentElement.clientWidth || window.innerWidth || document.documentElement.getBoundingClientRect().width
不能用screen.width获取视口宽度,因为有兼容性问题,有时候会获得设备宽度
screen.width
获取 dpr:window.devicePixelRatio
window.devicePixelRatio
容器的属性:
项目的属性:
媒体类型:
媒体查询中的逻辑:
媒体特征表达式:
媒体查询策略:
The text was updated successfully, but these errors were encountered:
布局针对的是结构
3-1
Sorry, something went wrong.
npm i -g vorlon vorlon
监听文件变动,自动刷新连接到页面的设备
npm i -g browser-sync
shift + 右键可在当前目录下打开命令行
shift + 右键
启动:
browser-sync start --server --files="css/*.css,*.html"
通过navigator.userAgent
navigator.userAgent
var isMobile = navigator.userAgent.match(/android|iphone|ipad|ipod/i)
No branches or pull requests
物理像素
物理像素(physical pixel)也可以叫做设备像素(dp:device pixel)
CSS 像素
CSS 像素也可以叫做逻辑像素(logical pixel),还可以叫做设备独立像素(dip:device independent pixel)
设备像素比
PPI
视口 viewport
width=device-width
与initial-scale=1
效果一样maximum-scale=1,minimum-scale=1
与user-scalable=no
效果一样获取视口 viewport 宽度:
不能用
screen.width
获取视口宽度,因为有兼容性问题,有时候会获得设备宽度获取 dpr:
window.devicePixelRatio
box-sizing
图标字体
flex 布局
容器的属性:
项目的属性:
媒体查询
媒体类型:
媒体查询中的逻辑:
媒体特征表达式:
媒体查询策略:
移动端常用单位
The text was updated successfully, but these errors were encountered: