标签:
1.获取css外部样式表的属性值
getCss(obj,‘属性名称‘);如:getCss(oSpan[0],‘height‘);
getComputedStyle(obj).属性名称;如:getComputedStyle(oDiv[0]).width;
2响应式布局
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta name="viewport" content="width=320, user-scalable=no, target-densitydpi=device-dpi"> 安卓专属,(私人博客说)将被放弃使用
使用方式,例如:
html{font-size:10px}
@media screen and (min-width:321px) and (max-width:375px){html{font-size:11px}}
@media screen and (min-width:376px) and (max-width:414px){html{font-size:12px}}
@media screen and (min-width:415px) and (max-width:639px){html{font-size:15px}}
@media screen and (min-width:640px) and (max-width:719px){html{font-size:20px}}
@media screen and (min-width:720px) and (max-width:749px){html{font-size:22.5px}}
@media screen and (min-width:750px) and (max-width:799px){html{font-size:23.5px}}
@media screen and (min-width:800px){html{font-size:25px}}
@media screen 媒体查询
3.图片大小百分比
img background-image background-size
4.布局百分比
width height position margin padding
5.字体大小百分比
em 倍数 是父级字体大小的倍数
rem 倍数 是老祖宗的倍数。
标签:
原文地址:http://www.cnblogs.com/zhenxianluo/p/5115111.html