Use pictures to do scroll bars (scrolling bar)

xiaoxiao2021-03-06  43

Who said that the scroll bar can only use monochrome? The scroll bar can also be used to make a background, so no matter what style is made, huh, huh. Imgscrolling.htm: ------------------------------------------------ ---------------------------- picture Make scroll bars Demo </ title> <meta http- Equiv = "Content-Type" Content = "text / html; charset = GB2312"></p> <p><Style type = text / css> #ScrollerContent {Position: absolute} body {font-size: 9pt; color: # 660000; text-decoration: none} </ stop> <script> var uph = 13; // up The height of the arrow VAR UPW = 9; / / The width of the upward arrow VAR DOWNH = 13; // Down the height var DownW = 9; // Down the width of the arrow VAR DRAGH = 26; // Rolling bar Height VAR DRAGW = 9; // Rolling Bar Width Var scrollh = 68; // Scrolls of high VAR Speed ​​= 9; // Rolling speed VAR DOM = Document.getlementByid? 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 downl; var downt; var Downl; var Downt; var Dragl; var Dragt; var rulerl; var rulert; var contentt; var conn; 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; RETU Rn 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 f > = Dragl && (Mousex <= (Dragl Dragw) && mousey> = Rulert &&</p> <p>(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)); 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.sc Rollleft;} else f (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.getlementByid ("scrollerContent"). style.top = contentt "px"; Document.getElementByid ("DRAG"). style.top = DRAGT "PX "; Document.GetElementByid ("</p> <p>"). style.top = DRAGT " PX ";}}} function scroll () {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 (); Timer = setTimeout ("scrollup ()", 25);}} Return false;} function scrolldown () {Gett (); if (clickbelow) {ix (Dragt> = (mousey- (Dragh / 2) ))) RETURN UP ();} if (clickdown) {if (Contentt> - (Contentt> - SPEED * ScrollLength); if (Dragt Scrollh - Dragh) Dragt = (Rulert ScrollH - Dragh); Contentt = Contentt - Speed; IF (Contentt <- (ContentTCLIPH) Contentt = - (ContentH - ContentCliph); MoveTo (); Timer = SetTimeout ("scrolldown ()", 25) }}}} 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.down.d; downl = document.down.d; downt = document.down. top; dragL = document.drag.left; dragT = document.drag.top; rulerT = document.ruler.top; contentH = document.scrollerContentClip.document.scrollerContent.clip.bottom; contentClipH =</p> <p>Document.scrollerContentClip.clip.bottom;} else if (DOM) {UPL = PARSEINT ("UP"). style.left; upt = parseInt (Document.getElementById ("UP"). style.top) DOWNL = PARSEINT (DOWN "). style.left; DOWNT = PARSEINT (" DOWN "). style.top); DRAGL = PARSEINT (Document.GtelementById (" 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οnlοad = "EVENTLOADER ()> <spanid = DRAGSTYLE = "Left: 203px; position: absolute; top: 116px"> <imgheight = 26 src = "http://www.flash8.net/images/logo.gif" width = 18 border = 1> </ span > <Spanid = rulerStyle = "top: 116px"> </ span> <span id = up style = "left: 203px; position: absolute; top: 100px"> <img height = 18 alt = "SRC =" http : //www.flash8.net/images/logo.gif "width = 18 border = 1> </ span> <span id = Down style =" Left: 203px; position: absolute;</p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-61014.html</div><div class="plugin d-flex justify-content-center mt-3"></div><hr><div class="row"><div class="col-lg-12 text-muted mt-2"><i class="icon-tags mr-2"></i><span class="badge border border-secondary mr-2"><h2 class="h6 mb-0 small"><a class="text-secondary" href="tag-2.html">9cbs</a></h2></span></div></div></div></div><div class="card card-postlist border-white shadow"><div class="card-body"><div class="card-title"><div class="d-flex justify-content-between"><div><b>New Post</b>(<span class="posts">0</span>) </div><div></div></div></div><ul class="postlist list-unstyled"> </ul></div></div><div class="d-none threadlist"><input type="checkbox" name="modtid" value="61014" checked /></div></div></div></div></div><footer class="text-muted small bg-dark py-4 mt-3" id="footer"><div class="container"><div class="row"><div class="col">CopyRight © 2020 All Rights Reserved </div><div class="col text-right">Processed: <b>0.032</b>, SQL: <b>9</b></div></div></div></footer><script src="./lang/en-us/lang.js?2.2.0"></script><script src="view/js/jquery.min.js?2.2.0"></script><script src="view/js/popper.min.js?2.2.0"></script><script src="view/js/bootstrap.min.js?2.2.0"></script><script src="view/js/xiuno.js?2.2.0"></script><script src="view/js/bootstrap-plugin.js?2.2.0"></script><script src="view/js/async.min.js?2.2.0"></script><script src="view/js/form.js?2.2.0"></script><script> var debug = DEBUG = 0; var url_rewrite_on = 1; var url_path = './'; var forumarr = {"1":"Tech"}; var fid = 1; var uid = 0; var gid = 0; xn.options.water_image_url = 'view/img/water-small.png'; </script><script src="view/js/wellcms.js?2.2.0"></script><a class="scroll-to-top rounded" href="javascript:void(0);"><i class="icon-angle-up"></i></a><a class="scroll-to-bottom rounded" href="javascript:void(0);" style="display: inline;"><i class="icon-angle-down"></i></a></body></html><script> var forum_url = 'list-1.html'; var safe_token = 'RTM4fwmKyS4Jrv2c5YIxb1pStYNy9kWYxJG0wMd8p6GUOGdmcpwgZgp2tytxaFOiskozLrRPJZukJLkL8niq_2Fw_3D_3D'; var body = $('body'); body.on('submit', '#form', function() { var jthis = $(this); var jsubmit = jthis.find('#submit'); jthis.reset(); jsubmit.button('loading'); var postdata = jthis.serializeObject(); $.xpost(jthis.attr('action'), postdata, function(code, message) { if(code == 0) { location.reload(); } else { $.alert(message); jsubmit.button('reset'); } }); return false; }); function resize_image() { var jmessagelist = $('div.message'); var first_width = jmessagelist.width(); jmessagelist.each(function() { var jdiv = $(this); var maxwidth = jdiv.attr('isfirst') ? first_width : jdiv.width(); var jmessage_width = Math.min(jdiv.width(), maxwidth); jdiv.find('img, embed, iframe, video').each(function() { var jimg = $(this); var img_width = this.org_width; var img_height = this.org_height; if(!img_width) { var img_width = jimg.attr('width'); var img_height = jimg.attr('height'); this.org_width = img_width; this.org_height = img_height; } if(img_width > jmessage_width) { if(this.tagName == 'IMG') { jimg.width(jmessage_width); jimg.css('height', 'auto'); jimg.css('cursor', 'pointer'); jimg.on('click', function() { }); } else { jimg.width(jmessage_width); var height = (img_height / img_width) * jimg.width(); jimg.height(height); } } }); }); } function resize_table() { $('div.message').each(function() { var jdiv = $(this); jdiv.find('table').addClass('table').wrap('<div class="table-responsive"></div>'); }); } $(function() { resize_image(); resize_table(); $(window).on('resize', resize_image); }); var jmessage = $('#message'); jmessage.on('focus', function() {if(jmessage.t) { clearTimeout(jmessage.t); jmessage.t = null; } jmessage.css('height', '6rem'); }); jmessage.on('blur', function() {jmessage.t = setTimeout(function() { jmessage.css('height', '2.5rem');}, 1000); }); $('#nav li[data-active="fid-1"]').addClass('active'); </script>