ipad 竖版 纯CSS分辨ipad横版和竖版

2020-10-24 01:23 jianzhan

拷贝编码
编码以下:

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf⑻">
<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>