New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-onepage-scroll

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-onepage-scroll

react-onepage-scroll === 一个用react实现的onepage-scroll组件

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

react-onepage-scroll

一个用react实现的onepage-scroll组件

支持鼠标滚轮

Alt Text

支持手机滑动

Alt Text

DEMO

在线demo: http://103.253.146.179:3008/

本地demo:

git clone https://github.com/DawnyWu/react-onepage-scroll.git
npm install
cd example
npm start

在浏览器中打开 http://localhost:3001 即可查看例子

使用

npm install react-onepage-scroll --save

import {ScrollSection, ScrollContainer} from 'react-onepage-scroll'

<ScrollContainer>
  <ScrollSection style={{backgroundImage: 'url(http://www.thepetedesign.com/demos/phones.png)',
                         backgroundRepeat: 'no-repeat' }} 
                         pageId={0}>
      <img style={{position: 'absolute', top: 0, right: 0, border: 0, zIndex: 999}} src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"/>
    </a>
  </ScrollSection>

  <ScrollSection style={{backgroundImage: 'url(http://www.thepetedesign.com/demos/back-phone.png)',
                         backgroundRepeat: 'no-repeat'}}
                         pageId={1}>
  </ScrollSection>

  <ScrollSection style={{backgroundImage: 'url(http://www.thepetedesign.com/demos/tilted-phone.png)',
                         backgroundRepeat: 'no-repeat'}}
                 pageId={2}>
  </ScrollSection>
</ScrollContainer>

Inspired by

onepage-scroll

License

MIT

FAQs

Package last updated on 27 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc