ipad 竖版 纯CSS判断ipad横版和竖版
发布时间:2016-12-27 来源:查字典编辑
摘要:Linkstudy#landscape{display:none;}body{background:red}#portrait{displa...
<!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>