Html No Scroll Code Example


Example 1: disable scroll css


/* Answer to: "disable scroll css" */

/*
You must set the height and overflow of the body, to disable
scrolling.
*/


html, body {
margin: 0;
height: 100%;
overflow: hidden
}

Example 2: css no scroll


<!DOCTYPE html>
<html>
<head>
<style>
body
{
height: 5000px; /* Make this site really long */
width: 5000px; /* Make this site really wide */
overflow: hidden; /* Hide scrollbars */
}
</style>
</head>
<body>

<h2>Hide scrollbars</h2>
<p>This example will hide the scrollbars (and the functionality - it is not possible to scroll inside the page).</p>
<p>Try to remove <strong>overflow: hidden;</strong> to see the effect.</p>

</body>
</html>

Example 3: javascript keep scroll visible


::-webkit-scrollbar {
-webkit-appearance: none;
width: 7px;
}
::-webkit-scrollbar-thumb {
border-radius: 4px;
background-color: rgba(0, 0, 0, .5);
-webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5);
}

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable