From b3b1bc2454f2003a3f46abd2212664b16742fa78 Mon Sep 17 00:00:00 2001 From: Jun Date: Sun, 6 Nov 2016 22:41:15 +0900 Subject: [PATCH] Update README.md Add perfect-scrollbar limitations. --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 94ef041..b05f5c2 100644 --- a/README.md +++ b/README.md @@ -106,22 +106,26 @@ You can fork the following JSFiddles for testing and experimenting purposes: * [Perfect Scrollbar](https://jsfiddle.net/DanielApt/xv0rrxv3/) * [Perfect Scrollbar (jQuery)](https://jsfiddle.net/DanielApt/gbfLazpx/) -## Requirements - -To make this plugin *perfect*, some requirements were unavoidable. -But, they're all very trivial and there is nothing to worry about. +## Before using perfect-scrollbar The following requirements should meet. * the container must have a 'position' css style. +* the container must be a normal container element. + * PS may not work well in `body`, `textarea`, `iframe` or flexbox. The following requirements are included in the basic CSS, but please keep in mind when you'd like to change the CSS files. -* the container must have an 'overflow:hidden' css style. +* the container must have an 'overflow: hidden' css style. * the scrollbar's position must be 'absolute'. * the scrollbar-x must have a 'bottom' css style, and the scrollbar-y must have a 'right' css style. + +Please keep in mind that perfect-scrollbar won't completely emulate native +scrolls. Scroll hooking is generally considered as bad practice, and +perfect-scrollbar should be used with care. Unless custom scroll is really needed, +please consider using native scrolls. ## How to use