代码改变世界

input固定在底部

2016-10-27 20:59  路途遥远,Go~  阅读(1209)  评论(0编辑  收藏  举报
// input固定在底部
//isFocusing获取焦点:true 失去焦点:false
_onTouchInput(isFocusing){
this.phone_width = screen.width;
let Boxbottom = this.refs['InputBoxBottom'];
let bottom_top = this.refs['bottom_top'];
if(Boxbottom) {
if (isFocusing) {
Boxbottom.style.position = 'static';
Boxbottom.style.width = (this.phone_width - 20) + 'px';
Boxbottom.style.bottom = 0;
bottom_top.style.paddingBottom = 0;

} else {
Boxbottom.style.position = 'fixed';
bottom_top.style.paddingBottom = 64 + 'px';
Boxbottom.style.width = (this.phone_width - 20) + 'px';
}
}
}