儘管與桌面相比字體應該更大,但以下代碼在iPad上不執行任何操作...怎麼回事?媒體查詢不能在iPad上工作
<style type="text/css">
@media screen and (min-device-width: 481px) and (orientation:landscape) {
.header {
font-family: courier new, monospace;
color: #999999;
font-size: 16pt;
line-height: 12pt;
width: 38.25em;
}
}
.header {
font-family: courier new, monospace;
color: #999999;
font-size: 12pt;
line-height: 12pt;
width: 38.25em;
}
</style>
如果我把@media放在另一個'header'類的下面,兩個設備上的字體都會變大; iPad以及桌面。我正試圖達到這個目標:iPad上的16pt字體和桌面上的12pt字體。 – user2607261
我相信有什麼尺寸的標準來設置這些,你的默認應該是底部.header然後你需要一個最小和最大的iPad,iPhone等,請看這裏:http://css-tricks.com/snippets/css/media-queries-for-standard-devices/ – verbanicm