Use Sticker. js to implement the sticker effect and Sticker. js to implement the sticker effect.
Sticker. js is a small JavaScript library that allows you to create beautiful Paster effects on webpages. No dependency (jQuery is not required). It can work in most mainstream browsers that support CSS3. The following is a simple example for you to find more functions.
Example:
HTML:
Copy codeThe Code is as follows:
<! -- Dom elements -->
<Div class = "sticker example-1"> </div>
<Div class = "sticker example-2"> </div>
CSS:
Copy codeThe Code 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:
Copy codeThe Code is as follows:
<! -- Call sticker js -->
Sticker. init ('. sticker ');
Download Online Demo now