网站设计移动 [英] Web Site Designing for Mobile
问题描述
我只使用一个样式表(即@media打印等)添加打印功能到一个网站,并想知道如果我可以使用添加了移动设备的支持类似的方法。
I just added printing capability to a web site using a style sheet (ie. @media print, etc.) and was wondering if I could use a similar method for adding support for mobile devices.
如果不是,我怎么检测移动设备?我的网页是C#(的.aspx),我想缩减为便于在移动设备上使用的页面。
If not, how do I detect a mobile device? My pages are C# (.aspx) and I'd like to scale back the pages for ease of use on a mobile device.
对我有什么建议?
编辑:我的妻子有一个黑莓手机,所以在miminum我想使我们的公司的网站为
My wife has a BlackBerry, so at a miminum I'd like to enable our company's web site for that.
推荐答案
我不知道请求样式表时,IPhone / iPod的触摸如何自行申报,但对于大多数使用
I'm not sure how the IPhone/iPod Touch declare themselves when requesting the stylesheet, but for most, using
<style type="text/css">
@media handheld
{
/* handheld styles */
}
</style>
应该做的伎俩。它的工作原理相同的方式@media打印做(或没有)。
should do the trick. It works in the same way @media print does (or doesn't).
有关媒体类型的完整列表,请参阅的这里
For a complete list of media types, see here.
这篇关于网站设计移动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!