簡體   English   中英

媒體查詢不適用於iOS

[英]Media query not working on iOS

我在使用iOS上的媒體查詢時不希望更改表(其他所有表都應按比例縮放)時遇到問題,它在Android手機和平板電腦上完美運行,但在iOS上卻不行。 我嘗試添加視口元標記,但這無濟於事。 誰知道怎么修它? 媒體查詢無效的部分:

table, thead, tbody, th, td, tr { 
display: block;
max-width:100%; 
 }
th{
display:none;
}

td { 
border: none; 
position: relative;
padding-left: 50%; 
font-size: 1em;
background-color: #F6F7FB;
}

td:before { 
position: absolute;
top: 6px;
left: 6px;
width: 45%; 
padding-right: 10px; 
white-space: nowrap;
line-height: 4em;
vertical-align: middle;
font-weight: bold;
}
  td:nth-of-type(2):before { content: "test"; }
 td:nth-of-type(3):before { content: "test"; }
 td:nth-of-type(4):before { content: "test"; }
 td:nth-of-type(5):before { content: "test"; }
 td:nth-of-type(6):before { content: "test"; }
 td:nth-of-type(7):before { content: "test"; }

我不確定,但是對我來說更改的顯示不正確。 而且在大多數情況下,表格中的相對位置/絕對位置也不起作用。 您是否可以通過顯示表和表單元將表結構更改為divs結構? 我總是這樣做,當需要使一些大表響應時,這沒有問題

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM