_javascript tips for using Sticker.js to implement sticker effects

Source: Internet
Author: User

Sticker.js is a small JavaScript library that allows you to create beautiful sticker effects in your Web pages. There is no dependency (no need for jQuery) to work in most mainstream browsers that support CSS3. Here are some simple examples of how you can find more features.

Use examples:

Html:

Copy Code code as follows:

<!--DOM elements-->
<div class= "Sticker example-1" ></div>
<div class= "Sticker example-2" ></div>

Css:

Copy Code code 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 Code code 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.