我正在使用css媒体查询来检测iPad上的肖像模式,并将定位样式应用于具有固定或绝对定位的div,我试过都无济于事。查询正在工作,但div不会以纵向模式为中心。它将在风景中完美地居中。Ipad以肖像模式居中,在横向模式下工作
您可以查看站点住在http://goodmorningmoon.ca通:springy88
这里是我的代码
@media only screen and (max-device-width: 1024px) and (orientation:portrait) {
#logo{ position:absolute; left:50%; width:160px; margin-left:80px;}
}
谢谢!提前。