
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
hero-parallax
Advanced tools
A cross-browser pure Javascript parallax plugin
<body>
<!-- Your content -->
<script src="parallax.js"></script>
<script>
new Parallax();
</script>
</body>
.parallax
<div class="wrapper>
<div
class="parallax"
data-parallax-background="https://images.unsplash.com/photo-1586204947495-462c218f5f05?ixlib=rb-1.2.1&auto=format&fit=crop&w=2434&q=80"
data-parallax-height="100vh"
>
Some content in here
</div>
</div>
You can optionally pass in a configuration option
<body>
<!-- Your content -->
<script src="parallax.js"></script>
<script>
new Parallax({
speedRatio: 1
});
</script>
</body>
Options Per Parallax Section (passed into each .parallax
div)
Option | Required | Description |
---|---|---|
data-parallax-background | yes | The url of the background image for the parallax section |
data-parallax-height | yes | The height of the parallax section (any valid css height property) |
Global Options (passed into the new Parallax()
)
Option | Type | Default | Description |
---|---|---|---|
debugMode | boolean | false | Whether to show debug statements in the log |
defaultHeight | string | 70vh | Fallback height of parallax element if one is not provided (any valid css height property) |
speed | number | 1 | A speed modifier to control the speed of the parallax effect. [A number between 1 and 10] |
parallaxClassName | string | .parallax | The class selector to use to target parallax elements |
wrapperClassName | string | .wrapper | The class selector to use to target parallax elements |
FAQs
A cross-browser pure Javascript parallax plugin
The npm package hero-parallax receives a total of 3 weekly downloads. As such, hero-parallax popularity was classified as not popular.
We found that hero-parallax demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.