上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 21 下一页
摘要: render : function(){ return <input value={this.state.bankCardValue} type="text" onKeyUp={this.keyUp} ref="bankInput"/> } 此情况下,报错。 直接赋值的input变为了受控的inpu 阅读全文
posted @ 2016-09-22 11:10 a fine day 阅读(12222) 评论(0) 推荐(1) 编辑
摘要: uc 不支持display : flex 方案:display:-webkit-box; iphone 5s 同样不支持 方案: display:-webkit-flex; flex : 数值 iphone 5s 采取 -webkit-flex:数值 uc 采取 -webkit-box-flex: 阅读全文
posted @ 2016-09-13 10:59 a fine day 阅读(930) 评论(0) 推荐(0) 编辑
摘要: 手机端适应宽度,高度,有时估计不好解决 但是找到好的方式,能让效率事半功倍 不需要用js控制 此栗子中的按钮,举一反三 整个psd宽度为750,按钮宽为280,高度69(不用考虑)宽度占37%,所以定位: header{ position:relative; } a{ position:absolu 阅读全文
posted @ 2016-08-19 14:45 a fine day 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 计算font size 时,要考虑是否用$(ele).css("fontSize") ,还是 window.getComputedStyle($(ele).get(0),null).fontSize; 因为$(ele).css("fontSize") 给的值是有可能为rem,em等情况的,所有,要得 阅读全文
posted @ 2016-08-16 10:54 a fine day 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 在android平台的uc浏览器和微信浏览器中使用display: flex;会出问题。 使用display: flex;的时候需要加上display: -webkit-box; 使用flex: 1;的时候要加上: 1 2 3 4 -webkit-box-flex: 1; -moz-box-flex 阅读全文
posted @ 2016-08-12 11:39 a fine day 阅读(499) 评论(0) 推荐(0) 编辑
摘要: 手机端的布局,可依据效果,例如750,设置好html{font-size:数值}, 考虑到chrome下字体最小为12像素,即使小于12像素,也按照12像素显示的问题,同时又考虑到320像素(iPhone5的宽度),320情况下的font-size、不要小于12像素(因为小于12像素,例如为9像素, 阅读全文
posted @ 2016-08-11 11:58 a fine day 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 在移动端中我们经常碰到横屏竖屏的问题,那么我们应该如何去判断或者针对横屏、竖屏来写不同的代码呢。首先在head中加入如下代码: 1 <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1 阅读全文
posted @ 2016-08-11 10:01 a fine day 阅读(222) 评论(0) 推荐(0) 编辑
摘要: position :absolute 认识以前有的理解不正确,以为没有设置left,top 与设置left :0,top : 0是一样的,现在认识为,错误! 没有设置的时候,该absolute元素{由于没法依据left, top等在有relative的元素固定位置,只能展示在父元素中,此说法可能有待 阅读全文
posted @ 2016-08-04 14:33 a fine day 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 是以为body 默认的margin造成,与padding没关系,因为body的默认padding为0 阅读全文
posted @ 2016-08-04 12:36 a fine day 阅读(1461) 评论(0) 推荐(0) 编辑
摘要: position: absolute;元素的宽度变为content的宽度,这是与position:relative(100%)不同的地方,若要呈现为100%, 有两个方法: 1.直接设置 width:100% 2.设置left:0px right:0px; 布局参看http://www.zhangx 阅读全文
posted @ 2016-08-02 16:21 a fine day 阅读(83) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 21 下一页