用图片代替滚动条的代码

使用图片代替的特殊滚动条 使用图片代替的滚动条,用js和asp实现 立即下载

<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<STYLE type=text/css>
#scrollerContent {POSITION: absolute}
body {font-size:9pt;color:#660000;text-decoration: none}
</STYLE>
<script>
var upH = 13;//向上的箭头的高度
var upW = 9; //向上的箭头的宽度
var downH = 13;//向下的箭头的高度
var downW = 9;//向下的箭头的宽度
var dragH = 26; //滚动条的高度
var dragW = 9; //滚动条的宽度
var scrollH =68; //滚动体的高度
var speed =9; //滚动的速度
var dom = document.getElementById ? true:false;
var nn4 = document.layers ? true:false;
var ie4 = document.all ? true:false;
var mouseY;
var mouseX;
var clickUp = false;
var clickDown = false;
var clickDrag = false;
var clickAbove = false;
var clickBelow = false;
var timer = setTimeout("",500);
var upL;
var upT;
var downL;
var downT;
var dragL;
var dragT;
var rulerL;
var rulerT;
var contentT;
var contentH;
var contentClipH;
var scrollLength;
var startY;
function down(e){
if((document.layers && e.which!=1) || (document.all && event.button!=1)) return true;
getMouse(e);
startY = (mouseY - dragT);
if(mouseX >= upL && (mouseX <= (upL + upW)) && mouseY >= upT && (mouseY <= (upT + upH))){
clickUp = true;
return scrollUp();
}
else if(mouseX >= downL && (mouseX <= (downL + downW)) && mouseY >= downT && (mouseY <= (downT + downH))){
clickDown = true;
return scrollDown();
}
else if(mouseX >= dragL && (mouseX <= (dragL + dragW)) && mouseY >= dragT && (mouseY <= (dragT + dragH))){
clickDrag = true;
return false;
}
else if(mouseX >= dragL && (mouseX <= (dragL + dragW)) && mouseY >= rulerT && (mouseY <= (rulerT + scrollH))){
if(mouseY < dragT){
clickAbove = true;
clickUp = true;
return scrollUp();
}
else{
clickBelow = true;
clickDown = true;
return scrollDown();
}
}
else{
return true;
}
}
function move(e){
if(clickDrag && contentH > contentClipH){
getMouse(e);
dragT = (mouseY - startY);
if(dragT < (rulerT))
dragT = rulerT;
if(dragT > (rulerT + scrollH - dragH))
dragT = (rulerT + scrollH - dragH);
contentT = ((dragT - rulerT)*(1/scrollLength));
contentT = eval('-' + contentT);
moveTo();
if(ie4)
return false;
}
}
function up(){
clearTimeout(timer);
clickUp = false;
clickDown = false;
clickDrag = false;
clickAbove = false;
clickBelow = false;
return true;
}
function getT(){
if(ie4)
contentT = document.all.scrollerContent.style.pixelTop;
else if(nn4)
contentT = document.scrollerContentClip.document.scrollerContent.top;
else if(dom)
contentT = parseInt(document.getElementById("scrollerContent").style.top);
}
function getMouse(e){
if(ie4){
mouseY = event.clientY + document.body.scrollTop;
mouseX = event.clientX + document.body.scrollLeft;
}
else if(nn4 || dom){
mouseY = e.pageY;
mouseX = e.pageX;
}
}
function moveTo(){
if(ie4){
document.all.scrollerContent.style.top = contentT;
document.all.ruler.style.top = dragT;
document.all.drag.style.top = dragT;
}
else if(nn4){
document.scrollerContentClip.document.scrollerContent.top = contentT;
document.ruler.top = dragT;
document.drag.top = dragT;
}
else if(dom){
document.getElementById("scrollerContent").style.top = contentT + "px";
document.getElementById("drag").style.top = dragT + "px";
document.getElementById("ruler").style.top = dragT + "px";
}
}
function scrollUp(){
getT();
if(clickAbove){
if(dragT <= (mouseY-(dragH/2)))
return up();
}
if(clickUp){
if(contentT < 0){
dragT = dragT - (speed*scrollLength);
if(dragT < (rulerT))
dragT = rulerT;
contentT = contentT + speed;
if(contentT > 0)
contentT = 0;
moveTo();
timer = setTimeout("scrollUp()",25);
}
}
return false;
}
function scrollDown(){
getT();
if(clickBelow){
if(dragT >= (mouseY-(dragH/2)))
return up();
}
if(clickDown){
if(contentT > -(contentH - contentClipH)){
dragT = dragT + (speed*scrollLength);
if(dragT > (rulerT + scrollH - dragH))
dragT = (rulerT + scrollH - dragH);
contentT = contentT - speed;
if(contentT < -(contentH - contentClipH))
contentT = -(contentH - contentClipH);
moveTo();
timer = setTimeout("scrollDown()",25);
}
}
return false;
}
function reloadPage(){
location.reload();
}
function eventLoader(){
if(ie4){
upL = document.all.up.style.pixelLeft;
upT = document.all.up.style.pixelTop;
downL = document.all.down.style.pixelLeft;
downT = document.all.down.style.pixelTop;
dragL = document.all.drag.style.pixelLeft;
dragT = document.all.drag.style.pixelTop;
rulerT = document.all.ruler.style.pixelTop;
contentH = parseInt(document.all.scrollerContent.scrollHeight);
contentClipH = parseInt(document.all.scrollerContentClip.style.height);
}
else if(nn4){
upL = document.up.left;
upT = document.up.top;
downL = document.down.left;
downT = document.down.top;
dragL = document.drag.left;
dragT = document.drag.top;
rulerT = document.ruler.top;
contentH = document.scrollerContentClip.document.scrollerContent.clip.bottom;
contentClipH = document.scrollerContentClip.clip.bottom;
}
else if(dom){
upL = parseInt(document.getElementById("up").style.left);
upT = parseInt(document.getElementById("up").style.top);
downL = parseInt(document.getElementById("down").style.left);
downT = parseInt(document.getElementById("down").style.top);
dragL = parseInt(document.getElementById("drag").style.left);
dragT = parseInt(document.getElementById("drag").style.top);
rulerT = parseInt(document.getElementById("ruler").style.top);
contentH = parseInt(document.getElementById("scrollerContent").offsetHeight);
contentClipH = parseInt(document.getElementById("scrollerContentClip").offsetHeight);
document.getElementById("scrollerContent").style.top = 0 + "px";
}
scrollLength = ((scrollH-dragH)/(contentH-contentClipH));
if(nn4){
document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP);
window.onresize = reloadPage;
}
document.onmousedown = down;
document.onmousemove = move;
document.onmouseup = up;
}
</script></head>
<BODY
onload="eventLoader()">
<SPAN
id=drag
style="LEFT: 203px;POSITION: absolute; TOP: 116px"><IMG
height=26 src="slider.gif" width=9 border=1></SPAN> <SPAN
id=ruler
style="TOP: 116px"></SPAN> <SPAN
id=up
style="LEFT: 203px; POSITION: absolute; TOP: 100px"><IMG
height=13 alt="" src="scrollup.gif" width=9 border=1></SPAN> <SPAN id=down
style="LEFT: 203px; POSITION: absolute; TOP: 186px"><IMG
height=13 alt="" src="scrolldown.gif" width=9 border=1></SPAN> <SPAN
id=scrollerContentClip
style=" LEFT: 100; VISIBILITY: visible; OVERFLOW: hidden; WIDTH: 100; CLIP: rect(0px 140px 194px 0px); POSITION: absolute; TOP: 100; HEIGHT: 100;border:#CC6600 1px solid"><SPAN
id=scrollerContent style="width: 100; height: 100">
<p>呵呵呵呵</p>
<p>呵呵呵呵</p>
<p>呵呵</p>
<p>呵呵</p>
<p>呵呵呵呵</p>
<p>呵呵呵呵</p>
<p>呵呵呵</p>
<p>呵呵呵呵 </p>
<p>呵呵</p>
</SPAN></SPAN>

<body></body>
</html>
 

jquery滚动条使用图片自定义美化(可使用图片替换滚动条) jquery,滚动条自定义,滚动条美化,滚动条使用图片 立即下载

相关推荐

自制图片代替滚动条代码

自制图片代替滚动条代码,喜欢的可以下载看下,不好之处尽请谅解!!!

易语言实现鼠标滚轮与纵向滚动条联动

易语言的组件纵向滚动条一般用于某个组件比如图片框,画板高度大于窗口的高度时,来通过位置改变显示下面的内容,要想和网页浏览器一样和鼠标的滚轮联动,我们可以通过以下思路来完成。 一、首先 启动窗口创建完毕,要让纵向滚动条获取焦点 纵向滚动条1.获取焦点 () 二、设置事件 .版本 2 .子程序 _纵向滚动条1_滚轮被滚动, 逻辑型 .参数 滚动距离, 整数型 .参数 功能键状态, 整数型 .如果 (滚动距离 > 0) 纵向滚动条1.位置 = 纵向滚动条1.位置 - 2 返回 (真)

511遇见 1万+

用js自定义滚动条样式(可使用图片哦)

系统自带的滚动条样式不要,css定义的滚动条样式太单调,现在有一个可以使用图片来定义滚动条哦。

vue 左右箭头代替滚动条 支持滚轮操作

<template> <div class="home"> <!-- 容器(外层盒子) --> <div ref="scrollOuter" class="scroll-box" @mouseScroll.prevent="handlescroll" @mousewheel.prevent="handlescroll"> <!-- 左箭头 (<) --> .

swk963的博客 1769

MFC 通用自绘滚动条

很好利用的自绘滚动条类!可以被EDIT LISTBOX CTRLLISTBOX使用

mfc 自绘滚动条代替系统默认

mfc 自绘滚动条代替系统默认。 自绘滚动条,很强大,带有例子,拦截系统自带的,确实不错 滚动条自绘

左右切换箭头代替滚动条,实现类似走马灯效果

当头部导航过多,内容放不下的时候,用左右切换箭头代替滚动条,实现类似走马灯效果

qq_41973526的博客 1647

易语言给大图片添加滚动条

易语言给大图片添加滚动条源码系统结构:易语言给大图片添加滚动条源码,给大图片添加滚动条 ======窗口程序集1 || ||------__启动窗口_创建完毕 || ||------_横向滚动条1_位置被改变 || ||--

滚动条样式收集

用图片来代替iframe滚动条↑↓ 用图片来代替iframe滚动条↑↓ 用下列代码替换网页的<title>..</title> <SCRIPT LANGUAGE="javascript">function scroll(n){temp=n;Out1.scrollTop=Out1.scrollTop+temp;if (temp==0) return;s...

weixin_30794851的博客 75

UE 顶点动画工具 (VAT)

导入模型需要勾选全精度UV。

iesoxj的博客 1641

如何解决ipa包上传App Store Connect时出现的无效二进制文件问题

本文详细解析了ipa包上传App Store Connect时出现无效二进制文件问题的常见原因及解决方案。从Scheme配置、架构支持到权限声明,提供了全面的检查步骤和实用技巧,帮助开发者快速定位并解决上传问题,确保应用顺利通过审核。

weixin_28833069的博客 315

垂直滚动条代码

前几天帮一个朋友 做了一个类似垂直滚动条的控件,不过这个空间中间的不是一个按钮滑块,而是一个飞机的图片,要想做这个控件先了解一下这个控件的原理,在网上找了好一段时间都没找到比较好的垂直滚动条的代码,最后在CodeProject里终于找到了,现在分享一下代码,希望大家在做的时候有个参考: 在C#中添加一个用户控件,在CS文件中添加如下代码 下列代码中缺少几个素材图片 代码 ...

weixin_30861459的博客 154

华硕电脑Win10改Win7系统:BIOS设置详解

通过上述步骤,华硕电脑用户可以将系统从Windows 10更改为Windows 7。虽然这个过程可能涉及一些技术细节和潜在的风险(如数据丢失和驱动不兼容),但只要按照指南仔细操作并做好准备工作,大多数用户应该能够成功完成系统回滚。请记住,在进行任何系统更改之前都要备份重要数据,并确保已了解所有潜在的风险和限制。希望本文能够帮助到需要回滚到Windows 7的华硕电脑用户!

nntxthml的博客 2262

图片代替滚动条 JS文件2

jscroll.js /*** jscroll.js* http://www.zhaomu.com/*--------------------------------------------------------------------------------------------------*/$.fn.extend({//添加滚轮事件//by junmousewheel:...

Hongyingsu2014的博客 157

推荐系统(1):推荐系统评测

对于可以离线优化的指标,我个人的看法是应该在给定覆盖率、多样性、新颖性等限制条件下,尽量优化预测准确度。用一个数学公式表达,离线实验的优化目标是:最大化预测准确度使得 覆盖率 > A多样性 > B新颖性 > C其中,A、B、C的取值应该视不同的应用而定。

数据不会骗人 2527

Ubuntu环境下读取罗技G29方向盘信息

Ubuntu环境下读取罗技G29方向盘信息

工大机器人工作室 3463

用图片替代滚动条的方法

网页特效|http://www.jscode.cn|---用图片替代滚动条的方法#scrollerContent {POSITION: absolute}body {font-size:9pt;color:#660000;text-decoration: none}var upH = 13;//向上的箭头的高度var upW = 9; //向上的箭头的宽度var downH = 13;//向下

hzf100的专栏 1710

【ComfyUI】QwenImageEdit OOTD角色与姿态匹配换装

本文介绍了一个基于Qwen Edit OOTD 2.0的ComfyUI工作流,能够实现角色与姿态匹配的智能穿搭生成。该工作流通过整合模型推理、姿态识别、图像拼接和渲染等节点,完成从角色图、姿态图到成品穿搭图的完整生成流程。核心采用Qwen Image系列模型进行图像理解和编辑,配合ControlNet进行姿态引导。用户只需提供角色图和姿态参考图,系统即可自动完成姿态解析、语义编码、采样生成等步骤,输出与输入姿态一致的穿搭图像。该方案适用于虚拟角色展示、电商试穿等场景,能保持角色特征一致的同时灵活变换姿态,显

Mr数据杨 1584
上一篇: 如何定义Select下拉框的边框颜色和滚动条样式
下一篇: LinScroll (jquery插件) (用图片自定义滚动条)
Reasoncool
博客等级 码龄21年 16粉丝 16原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值