perfect-scrollbar/examples/scrollbars-with-margin.html

46 lines
1.2 KiB
HTML
Raw Normal View History

2014-12-02 19:34:45 +08:00
<!DOCTYPE html>
<html>
2014-12-02 19:34:45 +08:00
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
2014-12-02 19:34:45 +08:00
<title>perfect-scrollbar example</title>
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
<script src="../dist/js/perfect-scrollbar.js"></script>
<style>
h1 { text-align: center; }
.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; }
2014-12-02 19:34:45 +08:00
.large-margin .ps-scrollbar-x-rail {
margin: 0 25%;
opacity: 0.5;
background-color: #eee;
}
.large-margin .ps-scrollbar-y-rail {
margin: 100px 0;
opacity: 0.5;
background-color: #eee;
}
</style>
2014-12-02 19:34:45 +08:00
</head>
<body>
<h1>Default</h1>
<div class="container">
<div class="content">
</div>
</div>
<h1>Margins</h1>
<div class="container large-margin">
2014-12-02 19:34:45 +08:00
<div class="content">
</div>
</div>
<script>
window.onload = function () {
[].forEach.call(document.querySelectorAll('.container'), function (el) {
Ps.initialize(el);
});
};
</script>
2014-12-02 19:34:45 +08:00
</body>
</html>