TecEye
New member
Wie der Titel schon sagt suche ich ein Script, dass die scrollbar nur anzeigt wenn man scrollt, natürlich fliegend wie hier im beispiel: Homepage - r.o.b.'s Kellerclub
Kennt da jemand was?
Kennt da jemand was?
Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Fenstertitel</title>
<style type="text/css">
#scrollWrapper {
overflow: hidden;
position: relative;
height: 200px;
border: 1px solid black;
}
#scroll {
overflow: auto;
height: 100%;
line-height: 200px;
padding-right: 30px;
margin-right: -30px;
}
</style>
</head>
<body>
<div id="scrollWrapper">
<div id="scroll">
scroll me (long text to make the line full:
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
if you can<br>and want
</div>
</div>
<script type="text/javascript">
var timeout = false;
document.getElementById("scroll").onscroll = function(){
window.clearTimeout(timeout);
this.style.paddingRight = this.style.marginRight= "0px";
var This = this;
window.setTimeout(function(){
This.style.paddingRight = This.style.marginRight= "";
}, 500);
}
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Fenstertitel</title>
<style type="text/css">
#scrollWrapper {
overflow: hidden;
position: relative;
height: 200px;
border: 1px solid black;
}
#scroll {
overflow: hidden;
height: 100%;
line-height: 200px;
}
#scroller {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
overflow: auto;
opacity: 0;
}
</style>
</head>
<body>
<div id="scrollWrapper">
<div id="scroller"><div></div></div>
<div id="scroll">
scroll me (long text to make the line full:
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
if you can<br>and want
</div>
</div>
<script type="text/javascript">
var scroller = document.getElementById("scroller");
var scroll = document.getElementById("scroll");
scroller.firstChild.style.height = scroll.scrollHeight + "px";
var timeout = false;
scroller.onscroll = function(){
scroll.scrollTop = scroller.scrollTop;
scroll.scrollLeft = scroller.scrollLeft;
window.clearTimeout(timeout);
this.style.opacity = 1;
var This = this;
window.setTimeout(function(){
This.style.opacity = "";
}, 500);
}
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Fenstertitel</title>
<style type="text/css">
#scrollWrapper {
overflow: hidden;
position: relative;
height: 200px;
border: 1px solid black;
}
#scroll {
overflow: hidden;
height: 100%;
line-height: 200px;
}
#scroller {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
overflow: auto;
opacity: 0;
}
</style>
</head>
<body>
<div id="scrollWrapper">
<div id="scroller"><div></div></div>
<div id="scroll">
scroll me (long text to make the line full:
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
if you can<br>and want
</div>
</div>
<script type="text/javascript">
var scroller = document.getElementById("scroller");
var scroll = document.getElementById("scroll");
scroller.firstChild.style.height = scroll.scrollHeight + "px";
var timeout = false;
scroller.onscroll = function(ev){
scroll.scrollTop = scroller.scrollTop;
scroll.scrollLeft = scroller.scrollLeft;
window.clearTimeout(timeout);
this.style.opacity = 1;
var This = this;
if (this.clientWidth > ev.clientX){
timeout = window.setTimeout(function(){
This.style.opacity = "";
}, 500);
}
}
scroller.onmousemove = function(ev){
window.clearTimeout(timeout);
if (this.clientWidth < ev.clientX){
this.style.opacity = 1;
}
else {
var This = this;
timeout = window.setTimeout(function(){
This.style.opacity = "";
}, 500);
}
}
</script>
</body>
</html>