ipad 竖版 纯CSS判断ipad横版和竖版
ipad 竖版 纯CSS判断ipad横版和竖版
发布时间:2015-05-12 来源:查字典编辑
摘要:纯CSS判断ipad横版和竖版,有些新手朋友可能还不会,想学什么时候都不会晚,接下来介绍实现代码,感兴趣的朋友可以研究下代码如下:Links...

纯CSS判断ipad横版和竖版,有些新手朋友可能还不会,想学什么时候都不会晚,接下来介绍实现代码,感兴趣的朋友可以研究下

代码如下:

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Link study</title>
<!--竖版本使用的样式-->
<style media="all and (orientation:portrait)" type="text/css">
#landscape { display: none; }
body {background:red}
</style>
<!--横版本使用的样式-->
<style media="all and (orientation:landscape)" type="text/css">
#portrait { display: none; }
body {background:green}
</style>
</head>
<body>
</body>
</html>

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新 Div+Css教程学习
热门 Div+Css教程学习
网页设计子分类