猿问

jq怎么做局部div滚动?

<style>
.top , .bottom{height:130px;background:#000;} .center{height:400px;overflow:hidden;position:relative;}
.center .box{width:100%;height:100%;position:absolute;}
.center .box ul{overflow:hidden;}
.center .box ul li{background:red;height:400px;width:100%;}
</style>

<div class="top"></div>

<div class="center">
    <div class="box">
        <ul>
        <li></li>
        <li></li>
        </ul>
    </div></div>

<div class="bottom"></div>

jq怎么做ul li的局部滚动,中间这块不能出现滚动条。还要考虑阻止浏览器滚动条事件。
需求是:用鼠标滑轮滚动。li会下滚或者上滚。前提是我这个鼠标在这里center范围,在范围外面可以使用浏览器的滚动事件,里面的禁止。


Smart猫小萌
浏览 426回答 1
1回答
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答