关于modernizr
flex和noflex这两个类名是引入了在modernizr里面选中了flex后下载的文件才有的是吗?为何我试的时候html标签内没有这个类名呢?但是支持flex操作,是浏览器的问题吗?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" />
<title>3-1终端检测</title>
<style>
footer,header{
width: 100%;
height: 100px;
background: pink;
display: flex;
justify-content: center;
align-items: center;
}
footer{
background: firebrick;
}
</style>
<script src="js/modernizr.js"></script>
</head>
<body>
<header>head</header>
<footer>footer</footer>
<script>
/* console.log(navigator.userAgent);
var isMobile = navigator.userAgent.match(/android|iphone|ipad|ipod/i);
//跳转
if(isMobile){
location.href = 'https://m.imooc.com';
}else{
location.href = 'https://www.imooc.com';
}
//加载资源文件
if(isMobile){
//zepto(和jq很相似)
getMobileResources(); //假设的代码
}else{
//jq
getPCResources(); //假设的代码
}
*/
</script>
</body>
</html>
21
收起
正在回答 回答被采纳积分+1
1回答
3.WebAPP开发与小程序
- 参与学习 人
- 提交作业 622 份
- 解答问题 6815 个
微信带火了小程序,也让前端工程师有了更多的展现机会,本阶段带你从移动基础知识的学习到webAPP开发,及小程序开发,让你PC端与移动端两端通吃。
了解课程

恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星