Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 瞄准手持样式表_Iphone_Css - Fatal编程技术网

Iphone 瞄准手持样式表

Iphone 瞄准手持样式表,iphone,css,Iphone,Css,我有什么办法只针对iphone?我试过了 media="handheld, only screen and (max-device-width: 480px)" 但它不会显示我的菜单? 我有两个菜单-一个用于web浏览器,一个用于移动web。我猜iphone只读取“屏幕”类型,这就是它显示的原因。我在我的主站点css中指定不显示我的移动菜单,在我的移动样式表中指定不显示web导航? 有什么想法吗?! 我的网站链接是www.therisingsuntarporley.co.uk 谢谢针对iPh

我有什么办法只针对iphone?我试过了

media="handheld, only screen and (max-device-width: 480px)" 
但它不会显示我的菜单? 我有两个菜单-一个用于web浏览器,一个用于移动web。我猜iphone只读取“屏幕”类型,这就是它显示的原因。我在我的主站点css中指定不显示我的移动菜单,在我的移动样式表中指定不显示web导航? 有什么想法吗?! 我的网站链接是www.therisingsuntarporley.co.uk


谢谢

针对iPhone的代码看起来不错(请参阅以获得一些改进)。不过,iPhone将同时显示常规样式表和特定于移动设备的样式表。要显示菜单,需要添加
display:block
mobile.css中的
菜单
元素

谢谢!如何阻止仅“移动”菜单显示在web版本上?如果移动菜单隐藏在常规样式表中,并且mobile.css应用于iPhone,则移动菜单将仅显示在移动设备上。