移动端的布局与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+cS0fGJcPnlo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l9xP7CrCvgG+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集的更多相关文章
-
来自IOS开发工程师的零基础自学HTML5经验分享
移动互联网的火爆,而Html具有跨平台.开发快的优势,越来越受到开发者的青睐.感谢IOS开发工程师“小木___Boy”’带来的HTML5学习经验分享. 一.学习途径 1.很多视频网站 比如慕课.和极客 ...
-
Expression Blend4经验分享:自适应布局浅析
今天分享一下Blend制作自适应分辨率布局的经验,大家先看下效果图: 这是一个标准的三分天下的布局,两侧的红色区域是背景区域,是用来干吗的呢,下面简单的分析一下,大家就明白了. 1.拿到一个项目,进行 ...
-
沉淀,再出发——在Ubuntu Kylin15.04中配置Hadoop单机/伪分布式系统经验分享
在Ubuntu Kylin15.04中配置Hadoop单机/伪分布式系统经验分享 一.工作准备 首先,明确工作的重心,在Ubuntu Kylin15.04中配置Hadoop集群,这里我是用的双系统中的 ...
-
Splunk大数据分析经验分享
转自:http://www.freebuf.com/articles/database/123006.html Splunk大数据分析经验分享:从入门到夺门而逃 Porsche 2016-12-19 ...
-
新东方APP技术架构演进, 分布式系统架构经验分享
今天的演讲题目是"新东方APP技术架构演进, C端技术经验分享" 作者:张建鑫, 曾任IBM高级软件架构师, 滴滴高级技术专家, 现任新东方集团高级技术总监 古代东西方的思想家都产 ...
-
Expression Blend4经验分享:文字公告无缝循环滚动效果
这次分享一个类似新闻公告板的无缝循环滚动效果,相信很多项目都会应用到这个效果.之前我也百度了一下,网上的一些Silverlight的文字或图片滚动效果,都是一次性滚动的,如果要做到无缝循环滚动,多数要 ...
-
Expression Blend4经验分享:制作一个简单的图片按钮样式
这次分享如何做一个简单的图片按钮经验 在我的个人Silverlight网页上,有个Iphone手机的效果,其中用到大量的图片按钮 http://raimon.6.gwidc.com/Iphone/de ...
-
线上Linux服务器运维安全策略经验分享
线上Linux服务器运维安全策略经验分享 https://mp.weixin.qq.com/s?__biz=MjM5NTU2MTQwNA==&mid=402022683&idx=1&a ...
-
HTML5学堂 全新的HTML5/前端技术分享平台
HTML5学堂 全新的HTML5/前端技术分享平台 HTML5学堂是做什么的? HTML5学堂~http://www.h5course.com~由多名热爱H5的讲师们组成的一个组织.致力于构建一个前端 ...
随机推荐
-
调用WebServices超时
1. 服务器端设置超时 在 web.config 的 system.web 里添加如下配置项: < httpRuntimeexecutionTimeout="300000"/ ...
-
ajax调用本地wcf中的post和get
我们可以通过jQuery调用本地或者远程的wcf服务,本文讲解的是对本地wcf服务的post和get调用方式. post和get到底有什么区别呢?此处不作详述. 但是,post对请求的数据格式更为严格 ...
-
STL 小白学习(5) stack栈
#include <iostream> #include <stack> //stack 不遍历 不支持随机访问 必须pop出去 才能进行访问 using namespace ...
-
Luogu4221 WC2018州区划分(状压dp+FWT)
合法条件为所有划分出的子图均不存在欧拉回路或不连通,也即至少存在一个度数为奇数的点或不连通.显然可以对每个点集预处理是否合法,然后就不用管这个奇怪的条件了. 考虑状压dp.设f[S]为S集合所有划分方 ...
-
python学习笔记_week16
note 作业问题: 1.写页面觉得丑(布局) float,clear:both,margin,padding,position:left...网上找模板:HTML模板,BoostStrap 2.背景 ...
-
将本地已有项目上传到github
1.在github上创建一个文件 2.看本地C盘中是否有.ssh文件夹 (C:\Users\用户名\.ssh) 检测有没有.ssh文件夹:执行命令 cd ~/.ssh 如果没有的话执行git命令: ...
-
用pip安装python 模块OpenSSL
windows下 1.配置好pip命令 下载安装 pip‑1.5.6.win‑amd64‑py2.7.exeor pip‑1.5.6.win32‑py2.7.exe 装好在C:\Python27\Sc ...
-
Apache服务器添加网站目录不在根目录的情况
Apache原本根目录: /var/www 需要添加的新的Apache网站目录 /home/*** 在Apache服务器虚拟配置下添加一个站点 <VirtualHost *:> Serve ...
-
Python自动化运维 - Django(二)Ajax基础 - 自定义分页
Ajax基础 AJAX 不是新的编程语言,而是一种使用现有标准的新方法. AJAX 是与服务器交换数据并更新部分网页的艺术,在不重新加载整个页面的情况下. 什么是Ajax AJAX = 异步 Java ...
-
(2)ansible主机清单文件inventory
1)inventory作用 作用:通常用于定义要管理主机的认证信息,例如ssh登录用户名,密码等相关信息 缺省文件:/etc/ansible/hosts 2)定义主机组方式 #vim /etc/ans ...