Home > Web Front-end > JS Tutorial > body text

Use Sticker.js to achieve sticker effect_javascript skills

WBOY
Release: 2016-05-16 16:17:24
Original
1672 people have browsed it

Sticker.js is a small JavaScript library that allows you to create beautiful sticker effects on web pages. No dependencies (no jQuery required) and works in most major browsers that support CSS3. There are simple usage examples below, and more functions are waiting for you to discover.

Usage example:

HTML:

Copy code The code is as follows:




CSS:

Copy code The 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 code The code is as follows:


Sticker.init('.sticker');

 Download now Online demo

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!