From c3444a7f57926fe336af480f744c14c72db0efa1 Mon Sep 17 00:00:00 2001 From: yitengjun Date: Thu, 26 May 2022 19:38:20 +0900 Subject: [PATCH] docs: update --- README.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 970a2c2..3ea6c8b 100644 --- a/README.md +++ b/README.md @@ -86,12 +86,12 @@ images.forEach(image => { ## Options -| Option | Type | Default | Description | -| ------------ | ------- | ------- | -------------------------------------------------------------------------------------- | -| ```scale``` | ```number``` | ```1.5``` | Parallax image scaling factor. | -| ```speed``` | ```number``` | ```1.5``` | Parallax speed. | -| ```willChange``` | ```boolean``` | ```false``` | If true, the element will be given a ```will-change: transform``` when Parallax is active. | -| ```wrapperClass``` | ```string``` | ```null``` | Class name of the automatically generated wrapper element. | +| Option | Type | Default | Description | +| - | - | - | - | +| ```scale``` | ```number``` | ```1.5``` | Parallax image scaling factor. | +| ```speed``` | ```number``` | ```1.5``` | Parallax speed. | +| ```willChange``` | ```boolean``` | ```false``` | If true, the element will be given a ```will-change: transform``` when Parallax is active. | +| ```wrapperClass``` | ```string``` | ```null``` | Class name of the automatically generated wrapper element. | These can be configured with the following JS code: ```javascript @@ -115,12 +115,13 @@ These options can be set individually for an element using the ```data-u-*``` at data-u-willchange > ``` -| Option | Description | -| -------------------- | -------------------------------------------------------------------------- | -| ```data-u-scale```="" | ```scale``` option. | -| ```data-u-speed```="" | ```speed``` option. | -| ```data-u-willchange``` | ```willChange``` option. Simply attach it to the element to make it valid. | -| ```data-u-wrapper-class```="" | ```wrapperClass``` option. | +| Attribute | Values | Description | +| - | - | - | +| ```data-u-scale``` | ```number``` | ```scale``` option. | +| ```data-u-speed``` | ```number``` | ```speed``` option. | +| ```data-u-willchange``` | | ```willChange``` option. Simply attach it to the element to make it valid. | +| ```data-u-wrapper-class``` | string | ```wrapperClass``` option. | +| | | | > Option names start with ```data-u-*```. Don't forget to prefix the option name with a "**u**", if u do.