⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 miniscroll.js

📁 这是一个功能基本完善的系统
💻 JS
字号:
// MiniScroll Object// gives controls to a set of 2 layers for scrolling// 19990410// Copyright (C) 1999 Dan Steinman// Distributed under the terms of the GNU Library General Public License// Available at http://www.dansteinman.com/dynapi/function MiniScroll(window,content) {	this.window = window	this.content = content	this.inc = 8	this.speed = 20	this.contentHeight = (is.ns)? this.content.doc.height : this.content.elm.scrollHeight	this.contentWidth = (is.ns)? this.content.doc.width : this.content.elm.scrollWidth	this.up = MiniScrollUp	this.down = MiniScrollDown	this.left = MiniScrollLeft	this.right = MiniScrollRight	this.stop = MiniScrollStop	this.activate = MiniScrollActivate	this.activate(this.contentWidth,this.contentHeight)}function MiniScrollActivate() {	this.offsetHeight = this.contentHeight-this.window.h	this.offsetWidth = this.contentWidth-this.window.w	this.enableVScroll = (this.offsetHeight>0)	this.enableHScroll = (this.offsetWidth>0)}function MiniScrollUp() {	if (this.enableVScroll) this.content.slideTo(null,0,this.inc,this.speed)}function MiniScrollDown() {	if (this.enableVScroll) this.content.slideTo(null,-this.offsetHeight,this.inc,this.speed)}function MiniScrollLeft() {	if (this.enableHScroll) this.content.slideTo(0,null,this.inc,this.speed)}function MiniScrollRight() {	if (this.enableHScroll) this.content.slideTo(-this.offsetWidth,null,this.inc,this.speed)}function MiniScrollStop() {	this.content.slideActive = false}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -