Merge pull request #287 from DanielApt/nojs-fallback
No longer require to manually add overflow:hidden, plugin does this. [#285]
This commit is contained in:
commit
c280c270b8
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
|||||||
node_modules
|
node_modules
|
||||||
bower_components
|
bower_components
|
||||||
/dist
|
/dist
|
||||||
|
.idea
|
@ -97,11 +97,11 @@ But, they're all very trivial and there is nothing to worry about.
|
|||||||
The following requirements should meet.
|
The following requirements should meet.
|
||||||
|
|
||||||
* the container must have a 'position' css style.
|
* the container must have a 'position' css style.
|
||||||
* the container must have an 'overflow:hidden' css style.
|
|
||||||
|
|
||||||
The following requirements are included in the basic CSS, but please
|
The following requirements are included in the basic CSS, but please
|
||||||
keep in mind when you'd like to change the CSS files.
|
keep in mind when you'd like to change the CSS files.
|
||||||
|
|
||||||
|
* the container must have an 'overflow:hidden' css style.
|
||||||
* the scrollbar's position must be 'absolute'.
|
* the scrollbar's position must be 'absolute'.
|
||||||
* the scrollbar-x must have a 'bottom' css style, and the scrollbar-y
|
* the scrollbar-x must have a 'bottom' css style, and the scrollbar-y
|
||||||
must have a 'right' css style.
|
must have a 'right' css style.
|
||||||
@ -117,7 +117,6 @@ requirements.
|
|||||||
#container {
|
#container {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 100%; /* Or whatever you want (eg. 400px) */
|
height: 100%; /* Or whatever you want (eg. 400px) */
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
```
|
```
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<script src="../dist/js/perfect-scrollbar.js"></script>
|
<script src="../dist/js/perfect-scrollbar.js"></script>
|
||||||
<style>
|
<style>
|
||||||
h1 { text-align: center; }
|
h1 { text-align: center; }
|
||||||
.container { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: hidden; }
|
.container { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: auto; }
|
||||||
.container .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; }
|
.container .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; }
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<title>perfect-scrollbar example</title>
|
<title>perfect-scrollbar example</title>
|
||||||
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
|
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
|
||||||
<style>
|
<style>
|
||||||
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: hidden; }
|
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px;}
|
||||||
.contentHolder .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; }
|
.contentHolder .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; }
|
||||||
.spacer { text-align:center }
|
.spacer { text-align:center }
|
||||||
</style>
|
</style>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||||
<script src="../dist/js/perfect-scrollbar.jquery.js"></script>
|
<script src="../dist/js/perfect-scrollbar.jquery.js"></script>
|
||||||
<style>
|
<style>
|
||||||
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: hidden; }
|
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: auto; }
|
||||||
.contentHolder .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; }
|
.contentHolder .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; }
|
||||||
.spacer { text-align:center }
|
.spacer { text-align:center }
|
||||||
</style>
|
</style>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
|
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
|
||||||
<script src="../dist/js/perfect-scrollbar.js"></script>
|
<script src="../dist/js/perfect-scrollbar.js"></script>
|
||||||
<style>
|
<style>
|
||||||
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: hidden; }
|
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: auto; }
|
||||||
.contentHolder .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; }
|
.contentHolder .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; }
|
||||||
.spacer { text-align:center }
|
.spacer { text-align:center }
|
||||||
</style>
|
</style>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
|
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
|
||||||
<script src="../dist/js/perfect-scrollbar.js"></script>
|
<script src="../dist/js/perfect-scrollbar.js"></script>
|
||||||
<style>
|
<style>
|
||||||
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 640px; height: 360px; overflow: hidden; }
|
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 640px; height: 360px; overflow: auto; }
|
||||||
.contentHolder .content { background-image: url('./azusa.jpg'); width: 12800px; height: 7200px; }
|
.contentHolder .content { background-image: url('./azusa.jpg'); width: 12800px; height: 7200px; }
|
||||||
.spacer { text-align:center }
|
.spacer { text-align:center }
|
||||||
</style>
|
</style>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
|
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
|
||||||
<script src="../dist/js/perfect-scrollbar.js"></script>
|
<script src="../dist/js/perfect-scrollbar.js"></script>
|
||||||
<style>
|
<style>
|
||||||
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: hidden; }
|
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: auto; }
|
||||||
.contentHolder .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; }
|
.contentHolder .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; }
|
||||||
.spacer { text-align:center }
|
.spacer { text-align:center }
|
||||||
h2 { text-align: center; }
|
h2 { text-align: center; }
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
|
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
|
||||||
<script src="../dist/js/perfect-scrollbar.js"></script>
|
<script src="../dist/js/perfect-scrollbar.js"></script>
|
||||||
<style>
|
<style>
|
||||||
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 640px; height: 360px; overflow: hidden; }
|
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 640px; height: 360px; overflow: auto; }
|
||||||
.contentHolder .content-x { background-image: url('./azusa.jpg'); width: 1920px; height: 360px; }
|
.contentHolder .content-x { background-image: url('./azusa.jpg'); width: 1920px; height: 360px; }
|
||||||
.contentHolder .content-y { background-image: url('./azusa.jpg'); width: 640px; height: 1080px; }
|
.contentHolder .content-y { background-image: url('./azusa.jpg'); width: 640px; height: 1080px; }
|
||||||
.spacer { text-align:center; }
|
.spacer { text-align:center; }
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
|
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
|
||||||
<script src="../dist/js/perfect-scrollbar.js"></script>
|
<script src="../dist/js/perfect-scrollbar.js"></script>
|
||||||
<style>
|
<style>
|
||||||
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: hidden; }
|
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: auto; }
|
||||||
.contentHolder .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; }
|
.contentHolder .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; }
|
||||||
.spacer { text-align:center }
|
.spacer { text-align:center }
|
||||||
</style>
|
</style>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
|
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
|
||||||
<script src="../dist/js/perfect-scrollbar.js"></script>
|
<script src="../dist/js/perfect-scrollbar.js"></script>
|
||||||
<style>
|
<style>
|
||||||
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: hidden; }
|
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: auto; }
|
||||||
.contentHolder .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; }
|
.contentHolder .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; }
|
||||||
.spacer { text-align:center }
|
.spacer { text-align:center }
|
||||||
</style>
|
</style>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
border: 1px solid gray;
|
border: 1px solid gray;
|
||||||
height:150px;
|
height:150px;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
overflow: hidden;
|
overflow: auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
#status { color: red; }
|
#status { color: red; }
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
border: 1px solid gray;
|
border: 1px solid gray;
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
overflow: hidden;
|
overflow: auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
#test .element {
|
#test .element {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
|
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
|
||||||
<script src="../dist/js/perfect-scrollbar.js"></script>
|
<script src="../dist/js/perfect-scrollbar.js"></script>
|
||||||
<style>
|
<style>
|
||||||
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: hidden; }
|
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: auto; }
|
||||||
.contentHolder .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; }
|
.contentHolder .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; }
|
||||||
.spacer { text-align:center }
|
.spacer { text-align:center }
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
|
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
|
||||||
<script src="../dist/js/perfect-scrollbar.js"></script>
|
<script src="../dist/js/perfect-scrollbar.js"></script>
|
||||||
<style>
|
<style>
|
||||||
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: hidden; }
|
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: auto; }
|
||||||
.contentHolder .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; }
|
.contentHolder .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; }
|
||||||
.spacer { text-align:center }
|
.spacer { text-align:center }
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
|
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
|
||||||
<script src="../dist/js/perfect-scrollbar.js"></script>
|
<script src="../dist/js/perfect-scrollbar.js"></script>
|
||||||
<style>
|
<style>
|
||||||
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: hidden; }
|
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: auto; }
|
||||||
.contentHolder .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; }
|
.contentHolder .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; }
|
||||||
.spacer { text-align:center }
|
.spacer { text-align:center }
|
||||||
|
|
||||||
|
@ -17,7 +17,8 @@
|
|||||||
}
|
}
|
||||||
#table tbody {
|
#table tbody {
|
||||||
height: 100px;
|
height: 100px;
|
||||||
overflow-y: hidden;
|
overflow-y: auto;
|
||||||
|
overflow-x:hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
#table tbody td, #table thead th {
|
#table tbody td, #table thead th {
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
border: 1px solid gray;
|
border: 1px solid gray;
|
||||||
height:150px;
|
height:150px;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
overflow: hidden;
|
overflow: auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -69,6 +69,8 @@ $ps-bar-hover: #999;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ps-container {
|
.ps-container {
|
||||||
|
overflow: hidden !important;
|
||||||
|
|
||||||
&.ps-active-x > .ps-scrollbar-x-rail,
|
&.ps-active-x > .ps-scrollbar-x-rail,
|
||||||
&.ps-active-y > .ps-scrollbar-y-rail {
|
&.ps-active-y > .ps-scrollbar-y-rail {
|
||||||
display: block;
|
display: block;
|
||||||
|
Loading…
Reference in New Issue
Block a user