Use Sticker. js to implement the sticker effect and Sticker. js to implement the sticker effect.

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.