hladké rolovanie css
html {
scroll-behavior: smooth;
}
/* No support in IE, or Safari
You can use this JS polyfill for those */
http://iamdustan.com/smoothscroll/
prejdite nadol štýl
<script type="text/javascript">
$window.scrollTop(function(){
var a = 112;
var pos = $window.scrollTop();
if(pos > a) {
$("menu").css({
position: 'fixed'
});
}
else {
$("menu").css({
position: 'absolute',
top:'600px'
});
}
});
</script>
hladké posúvanie webových stránok
$('#element').foundation('_destroy');
ako posunúť nadol
I can either scroll down a page by using window.scrollBy() function
from java script
Example:
((JavascriptExecutor) driver).executeScript("window.scrollBy(0,500)");
Or I use Action class:
Actions actions = new Actions(driver);
actions.sendKeys(Keys.ARROW_UP)
.sendKeys(Keys.ARROW_DOWN)
.sendKeys(Keys.PAGE_DOWN) —> to scroll down
.sendKeys(Keys.PAGE_UP) —> to scroll up