gpt4 book ai didi

ios - iOS 7 中的媒体查询不起作用

转载 作者:行者123 更新时间:2023-12-01 17:26:04 27 4
gpt4 key购买 nike

我正在使用一些针对 iPad 和 iPhone 的横向和纵向媒体查询,但从 iOS 7 开始,它们不再起作用。不过,它们在 iOS 6 中运行良好。有没有人有类似的经历?

这是我正在使用的部分代码:

<style type="text/css">
/* iPad (landscape) */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : landscape) {
.header {
font-family: courier new, monospace;
color: #999999;
font-size: 14pt;
line-height: 104%;
width: 37.5em; }
.action {
font-family: courier new, monospace;
color: #999999;
font-size: 14pt;
line-height: 104%;
width: 37.5em; }
.character {
font-family: courier new, monospace;
color: #999999;
font-size: 14pt;
line-height: 104%;
padding-left: 12.25em;
width: 21em; }
.dialogue {
font-family: courier new, monospace;
color: #999999;
font-size: 14pt;
line-height: 104%;
padding-left: 6.15em;
width: 22em; }
.info {
display: none; }}
/* iPad (portrait) */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait) {
.header {
font-family: courier new, monospace;
color: #999999;
font-size: 12pt;
line-height: 104%;
width: 37.15em; }
.action {
font-family: courier new, monospace;
color: #999999;
font-size: 12pt;
line-height: 104%;
width: 37.15em; }
.character {
font-family: courier new, monospace;
color: #999999;
font-size: 12pt;
line-height: 104%;
padding-left: 12em;
width: 21em; }
.dialogue {
font-family: courier new, monospace;
color: #999999;
font-size: 12pt;
line-height: 104%;
padding-left: 6em;
width: 22em; }
.info {
display: none; }}
</style>

最佳答案

<meta name="viewport" content="initial-scale=1.0, width=device-width, user-scalable=no" />

确保您的 html 代码包含此行。

关于ios - iOS 7 中的媒体查询不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18952156/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com