03 2018 档案
textarea下高度自适应
摘要:1,背景:textarea的高度不会随内容的增加而自适应,会出现滚动条 解决方案: 1)使用div模拟textarea 使用h5的属性 <div contenteditable="true"></div> 会变成可输入的内容区 2)获取滚动的高度 scrollheight (注意:此属性不能很好的适
阅读全文
微信H5开发
摘要:1,line-height 不垂直居中 解决方法:用padding写高度 2,手指滑动事件 touchmove 3,页面滚动事件:touchmove 4,要写不同手机适配的基数font-size 5。重置页面高度 window.addEventListener('resize',function()
阅读全文
前端面试整理
摘要:1,jquery的attr()和prop()的区别? a:对于HTML元素本身就带有的固有属性,在处理时,使用prop方法。 b:对于HTML元素我们自己自定义的DOM属性,在处理时,使用attr方法。 •.attr( attributeName, value ) •.attr( attribute
阅读全文
浙公网安备 33010602011771号