I'm going to build a website using xhtml, css, javascript and php. And this website should properly appear on iPhone and other kinds of smart phones just like it will appear on computers, so I want to konw what are the points that I should keep in mind when I start building such website.
2条回答 默认 最新
- duandingyou3331 2012-01-14 10:01关注
1) Use the
<meta name="viewport">
tag to correctly set the scale so that your content fills the screen2) Avoid internally scrolling areas such as iframes or divs with
overflow:scroll
as these do not work on iOS4 and earlier, or most versions of Android3) Avoid
position:fixed
to pin navigation to particular parts of the screen as this does not work on iOS4 and earlier, or most versions of Android4) Don't rely on hover or rollover-based interaction like drop down menus that appear when you mouseover because these don't work well or at all on touch-based devices
5) Avoid small text or links close together because if your page is 800px wide and it's being shrunk down to a 320px screen, these will be hard to read or tap.
6) Don't use Flash
More generally, you have a choice for how to approach this:
1) Make a single site design with nice big text that can be used well when scaled down to a small screen
2) Design two layouts for your site and use JavaScript or CSS media resolution queries to switch stylesheets between the mobile and desktop versions, or
3) Make a so-called liquid layout where the width can be scaled gracefully for different screen sizes without zooming
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 mmocr的训练错误,结果全为0
- ¥15 python的qt5界面
- ¥15 无线电能传输系统MATLAB仿真问题
- ¥50 如何用脚本实现输入法的热键设置
- ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
- ¥30 深度学习,前后端连接
- ¥15 孟德尔随机化结果不一致
- ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
- ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
- ¥15 谁有desed数据集呀