移动端的布局与pc端的布局相比 移动端的布局就简单的多,兼容性不必考虑那么多,css3各种特性基本上是可以放肆的写;(个人看法)

本人做移动web 布局一段时间了,把这其中遇到的一些问题总结下来,均是个人看法,各位大牛多多拍砖。。。。。

1.布局肯定使用的是自适应布局,前提是将body的width height 设置成100%;

2.准备好通用的reset.css,移除浏览器的默认样式,使用自定义默认样式,让各个浏览器统一基础样式;

3.准备好head内meta的各个标记,因为这个是必不可少的,下面是我常用的

    <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="yes" name="apple-touch-fullscreen">
<meta content="telephone=no" name="format-detection">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="#ffffff" name="msapplication-TileColor">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">

4.在做布局前,先分析页面的结构,分层,在脑子里行程自己的思路

然后将一部分布局的结构写下来,写完结构后在写css布局和样式,这样会快很多,一块儿布局做完后再进行 预览 和调试,避免写一行就刷新一次页面看效果,很耽误时间;

5.页面两边留空指定宽度

一般的页面两边都会保留一些空白,这样看上去会自然一些,直接用div ,css 不设置他的宽度为100%,  margin left right =10px 即可,如果设置为width:100%,那么就会将页面撑开,因为本身已经100%了,再加上外边距肯定就超出了;

6.定位用的是最多的了

position:absolute,position:fixed 用的是最多的,同样有些情况可以用float和margin来代替,通过调整margin的值的大小来调整元素的位置;

7.div内float元素,div的高度不会被撑起

如果div wraper内的元素是浮动的,你会发现外层的div的高度是没有的,我最常用的就是设置外层div的overflow:hidden;当然还有其他很多的办法;

8.微信内网页和浏览器里面显示的效果有些很大差异

a:input 设置了readonly后,apple上面点击input 不会弹出键盘,但是android手机上在微信里面打开网页后点击就会弹出键盘,在andorid浏览器内则不会弹出,最后的解决办法只能用span代替,很无奈,不知道有没有好办法;

b:微信内浏览,设置了position后div 内的数字,会被识别成手机号码 颜色也变了,当时找了很久不知道哪里的问题,因为也增加了meta,可根本不管用,一行一行的删,结果是设置了position的问题,最后进行了优化才算处理这个怪咖;

9.media 响应式

全战响应式到是不多,很多小的地方还是需要用到的,比如 一行提示信息需要不换行的显示,在6p上显示 ok,在p5上面就会换行,比如aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfUAAABUCAIAAAAUHTm5AAAgAElEQVR4nO2d+08bWb7g52+xhEDikl0WRUrUUitCCFkCCSGElEgWliIUiTW6LKwWlrkeO/cC2z2POzT0dEinaaczxkkM/cDpDtjYVX5U2RgbjA2GCg/bkBSv4uUDTLqTDj37w7HLZbvKLhO7J7lzPipFjqmXj+FzvvWtb53zG/DytTm4PbW4bVrcfoTN3/70fiQSeYlAIBCId5hIJPKH4cdPZp65IlHXRnR6I3r26k1R6X/7++sX7PIb8PI1lLtpcQv5HYFAIN4LWL87I1GoeAG/B3dMi9umhe2H2PztTx9EIpFXCAQCgXiHiUQiH3/x2OBecUaAKwJcEXD26k1R6X9P9bspuGNa3DYubj/Ekd8RCATiPSASiXx87/G4+xkZBs6wkN9/jPndFPP7V8jvCAQC8Y4T8/v0ChkGUPFC8fuuKbhrCu6g/AwCgUC8F0QikY/u6cenV4nwCRk+cYZPTvn8/vNUcM8U3DUu7upwP/I7AoFAvPtAv383vUqETghBv//4s2mJMQUZY5DRWRduf6pFfkcgEIh3nEgk8vEXo+PudSJ8BpfTV+d8fg8emIIHk8EDnTWo/nQkq98BggNqEAQCUQiy+/3e1+PuMBF+SYZfkuGXpz+dF5WWp/j9zdTSkWnp0Bg81FmXbv9Fh/yeE6hBEAhEIRARv3897t4gIz+RkZ+ckZ9OX/1SVFr+dw6/AT++MS1FTcGoMRh9aH12+y+PkN9zAjUIAoEoBNn9Pvzt+MwmEXlFRl6RkVenr34pKv0ffH5fihqXog9tz25/9hj5PSdQgyAQiEIgwu/fjXs2iY3X5MZrcuP16atfiv4lze9TSyempRPT0slD2+rtv+iR33MCNQgCgSgEWf3+0fD4uOcFsfGG2HhDbrzh97tp+cS0fGJcP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PLl9xP7CrCvgG+Ilb4h5PfcQA2CQCAKQT78/tMb++oJVPw35Mr/Q37PEdQgCASiEGT3+1cG4zw9u3UOF36/O1ZP7KvAvgK+RX7PHdQgCASiEOTN746VE/vKybfEykfI7zmCGgSBQBSCfPj9xzeOFWB/BmxU9Gv7sz5U/54jqEEQCEQhyOr3/q8Mpnl6buscLvx+t1FR61IUC0ZH8Wc9g+j51dxADYJAIApBHvx+8uMbPBjFFo7N/sPH5uV//wSNP5MbqEEQCEQhEOf3rYx+f/nG7D8y+Q4nZ/e1T4OqP6HxgXMDNQgCgSgEWf3+yQPD1PyWb/sXuPD4Hfzt58nZgx9mmCeuvfvjgd9+hOb3yA3UIAgEohBkj98fGEyZ/R49+/mJa2/csfONdfve6HxXz33k95xADYJAIApBHuL349PX39q2xyxbetOLO7rZ/616h+bXfi9ADYJAIAqBSL/Pb/8CFx6/H528HjW/eGx8rnu6+emDmf/1b8PI7zmBGgSBQBQCcX6nfZn8Dl4/Mr7QPX2u/X7jk/vutu57yO85gRoEgUAUAjF+N8/T89vnQn7//9DpYveumlJRAAAAAElFTkSuQmCC" alt="" /> 在p5里面肯定显示会换行,所以需要用media来进行控制他的宽度;

10.页面的字体和大小好多都说用rem,本人还没用过这个东西,一直都是不设置他的字体大小,因为默认都是16px,小的字体就用14px,大点的就用18px,再自定义其他即可;

11.元素的click事件,在iphone上面会有延迟500ms,可以用fastclick插件解决,引入这个js后    带上这段代码,缓慢正症状瞬间不见勒

window.addEventListener('load', function() {
FastClick.attach(document.body);
}, false);

遗留问题:

1.在做一个im聊天页面的时候,消息输入框在页面最下面采用position:fixed定位到底部,但是在一些手机上经常出现 键盘弹出遮住输入框的情况,有的时候就不会出现,循环交替,通过js动态设置他页面的布局,但是效果不明显,苦苦无法解决,求高手解决!

以上是本人在开发中所见所得和所问,均为个人看法和观点,请高手们拍!  以后想到了其他的  再继续写第2集;

Html5 布局经验分享-第1集的更多相关文章

  1. 来自IOS开发工程师的零基础自学HTML5经验分享

    移动互联网的火爆,而Html具有跨平台.开发快的优势,越来越受到开发者的青睐.感谢IOS开发工程师“小木___Boy”’带来的HTML5学习经验分享. 一.学习途径 1.很多视频网站 比如慕课.和极客 ...

  2. Expression Blend4经验分享:自适应布局浅析

    今天分享一下Blend制作自适应分辨率布局的经验,大家先看下效果图: 这是一个标准的三分天下的布局,两侧的红色区域是背景区域,是用来干吗的呢,下面简单的分析一下,大家就明白了. 1.拿到一个项目,进行 ...

  3. 沉淀,再出发——在Ubuntu Kylin15.04中配置Hadoop单机/伪分布式系统经验分享

    在Ubuntu Kylin15.04中配置Hadoop单机/伪分布式系统经验分享 一.工作准备 首先,明确工作的重心,在Ubuntu Kylin15.04中配置Hadoop集群,这里我是用的双系统中的 ...

  4. Splunk大数据分析经验分享

    转自:http://www.freebuf.com/articles/database/123006.html Splunk大数据分析经验分享:从入门到夺门而逃 Porsche 2016-12-19 ...

  5. 新东方APP技术架构演进, 分布式系统架构经验分享

    今天的演讲题目是"新东方APP技术架构演进, C端技术经验分享" 作者:张建鑫, 曾任IBM高级软件架构师, 滴滴高级技术专家, 现任新东方集团高级技术总监 古代东西方的思想家都产 ...

  6. Expression Blend4经验分享:文字公告无缝循环滚动效果

    这次分享一个类似新闻公告板的无缝循环滚动效果,相信很多项目都会应用到这个效果.之前我也百度了一下,网上的一些Silverlight的文字或图片滚动效果,都是一次性滚动的,如果要做到无缝循环滚动,多数要 ...

  7. Expression Blend4经验分享:制作一个简单的图片按钮样式

    这次分享如何做一个简单的图片按钮经验 在我的个人Silverlight网页上,有个Iphone手机的效果,其中用到大量的图片按钮 http://raimon.6.gwidc.com/Iphone/de ...

  8. 线上Linux服务器运维安全策略经验分享

    线上Linux服务器运维安全策略经验分享 https://mp.weixin.qq.com/s?__biz=MjM5NTU2MTQwNA==&mid=402022683&idx=1&a ...

  9. HTML5学堂 全新的HTML5/前端技术分享平台

    HTML5学堂 全新的HTML5/前端技术分享平台 HTML5学堂是做什么的? HTML5学堂~http://www.h5course.com~由多名热爱H5的讲师们组成的一个组织.致力于构建一个前端 ...

随机推荐

  1. mysql中的第三范式

    ※多表操作 (凡是多表,都要用到关联技术(把多表合并成一个新表): 左关联.右关联.内关联.还有一个外(全)关联,MySQL不支持,为考虑软件兼容,我们开发一般不用.) ※表与表之间的关系:1对1,1 ...

  2. Android drawable里面的图片存在,但是getIdentifier或者findViewByid找不到时处理步骤

    drawable里面的图片存在,但是getIdentifier或者findViewByid找不到时执行一下project -> clean

  3. 深入理解计算机系统第二版习题解答CSAPP 2.14

    假设x和y的字节值分别为0x66和0x39.填写下表,指明各个C表达式的字节值. 0x66 = 0110 0110(B) 0x39 = 0011 1001(B) 表达式 值 x & y 0x2 ...

  4. aggregation 详解4(pipeline aggregations)

    概述 管道聚合处理的对象是其它聚合的输出(桶或者桶的某些权值),而不是直接针对文档. 管道聚合的作用是为输出增加一些有用信息. 管道聚合大致分为两类: parent 此类聚合的"输入&quo ...

  5. LintCode 55 比较字符串

    比较两个字符串A和B,确定A中是否包含B中所有的字符.字符串A和B中的字符都是 大写字母 注意事项 在 A 中出现的 B 字符串里的字符不需要连续或者有序.   样例 给出 A = "ABC ...

  6. 【转】傅盛:怎样做一个创业公司CEO?

    摘要 : 傅盛High聊会,泉灵姐姐给的命题作文.怎样做一个创业公司CEO,核心还是思维模式. 这次傅盛High聊会,泉灵姐姐给我的命题作文.创业要如何开始,本质还是思维模式.首先学会把一个开放式问题 ...

  7. ant design 自定义表单验证大全

     需求是 账号名可以是手机号也可以是邮箱 要做手机号和邮箱的验证,官网的那个验证规则不匹配  怎么自定义验证规则?  一:组件部分 <Form horizontal> <Row gu ...

  8. webstorm添加vue模板支持

    字谕纪泽: 八月一日,刘曾撰来营,接尔第二号信并薛晓帆信,得悉家中四宅平定,至以为尉. 汝读”四书”无甚心得,由不能虚心涵泳,切己体察.朱子教人读书之法,此二语最为精当.尔现读”离娄”,即如“离娄”首 ...

  9. .Net程序跑在Linux上

    .Net越来越拥抱开源了,今天就试了如何让.Net程序跑在Linux上,果然再无人可以阻挡.Net的脚步了. Linux Disibutaion:Open Logic 7.2 1.Install .N ...

  10. poj2337 欧拉路径

    poj2337 这道题昨天晚上开始做,今天才A.但是问题想透了, 发现其实没那么难 题目大意: 给你一些单词,如果一个单词的末尾字符与另一个单词首字符相同,则两个的单词可以连接.问是否可以把所有单词连 ...