Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

页面内容的横向滚动条固定在页面底部:当页面内容有横向滚动条,同时数据很长使得横向拖动滚动条的时候需要将页面滑动至滚动条出现的地方,用户体验不好,因此写此小插件解决该问题。

NotificationsYou must be signed in to change notification settings

shinne/jquery.scrollFixedBottom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

问题描述

当页面内容有横向滚动条,同时数据很长使得横向拖动滚动条的时候需要将页面滑动至滚动条出现的地方,用户体验不好,因此写此小插件解决该问题。

问题解决

页面内容的横向滚动条一直出现在用户可操作范围内,提升用户体验。

快速体验

https://shinne.github.io/jquery.scrollFixedBottom/index.html

外部依赖

jquery.js

快速上手

  • 引入jquery.js和scrollFixedBottom.js
  • 可能出现横向滚动条的div.scroll-wrap及宽度很宽的内容div.scroll-item:
<divclass="scroll-wrap"style="overflow-x:scroll;width:800px;"><divclass="scroll-item"style="width:3000px;height:3000px;"></div></div>
  • 初始化该插件:
newScrollFixedBottom();

配置参数

options

字段类型默认值说明
scrollWrapEleString".scroll-wrap"具有横向滚动条的外层包裹器
scrollItemEleString".scroll-item"需要被横向滚动的真正元素
leftNumber0初始化时需要横向滚动的左偏移量

方法

  • var scrollFixed = new ScrollFixedBottom(options)

    通过options配置,初始化该插件,并返回该插件的实例
  • scrollFixed.refresh(options)

    异步加载数据或者需要横向滚动的数据发生变化时,重新渲染该横向滚动条
  • scrollFixed.reload()

    当滚动数据发生display属性变化时调用该方法

About

页面内容的横向滚动条固定在页面底部:当页面内容有横向滚动条,同时数据很长使得横向拖动滚动条的时候需要将页面滑动至滚动条出现的地方,用户体验不好,因此写此小插件解决该问题。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp