Sticker.js is a very small JavaScript library that allows you to create beautiful sticker effects in web pages. No dependencies (no need for jQuery) can work in most mainstream browsers that support CSS3. Below are simple usage examples, and more functions are waiting for you to discover.
Example of usage:
HTML:
The code copy is as follows:
<!-- dom elements -->
<div></div>
<div></div>
CSS:
The code copy is as follows:
.sticker {
width: 180px;
height: 180px;
}
// add image
.example-1 .sticker-img {
background-image: url(heroes-2.png);
}
// add color
.example-2 .sticker-img {
background-color: #ff4a85;
}
// change shadow opacity
.example-2 .sticker-shadow {
opacity: 0.6;
}
JavaScript:
The code copy is as follows:
<!-- call sticker js -->
Sticker.init('.sticker');
Download the online demo now