隐藏滚条的方法

2018-09-27  本文已影响0人  Challis

1.HTML中的代码

<div class='hidescroll'>
  <div id='content'>
    <div class='home'>
    </div>
  </div>
</div>

2.css里面的代码

.hidescroll{
width:100%;
height:100%;
overflow-x:hidden;
overflow-y:auto;
padding: 2.75rem 0 ;
}
#conten{
height:100%;
overflow-x:hidden;
position:relative;
}

3.js里面的代码

document.doucmentElement.style.fontSize=innerWidth/320*16+'px';   //设置1rem为16px
$('#content').width(innerWidth+20)
$('.home').width(innerWidth)
上一篇 下一篇

猜你喜欢

热点阅读