Solved

Paper tearing animation

Posted on 2016-11-02
6
146 Views
Last Modified: 2016-11-04
Hi, I am a beginner in jQuery. I would like to create paper tearing effect animation using jQuery or HTML5 or CSS3.

When a user mouse over and drags, the paper should be tearable.

Can anyone suggest some good library to use or point me in the right direction?
0
Comment
Question by:Perumal_RM
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 10

Expert Comment

by:Prakash Samariya
ID: 41869724
0
 

Author Comment

by:Perumal_RM
ID: 41870022
Thanks Prakash. I am after a Paper Tearing or ripping effect in jQuery.
0
 
LVL 4

Expert Comment

by:Elizabeth Anderson
ID: 41870023
Please run the below script in HTML -

html {
  background-image: linear-gradient(#fc6, #6cf, #f66);
  color: #333;
  min-height: 100%;
  padding: 25px;
}
.tearoff {
  width: 38.45em;
  -webkit-filter: drop-shadow(1px 1px 2px hsla(0,0%,0%,.25));
}
h1 {
  background-color: #fff;
  float: left;
  font: bold 1.5em/10.4 sans-serif;
	margin: 0;
  text-align: center;
  width: 18em
}
p {
  background-color: #fff;
  background-clip: padding-box;
  border-left: 3px dotted #fff;
  float: right;
  font: 1.25em/2 sans-serif;
  margin: 0 0 .15em;
  text-align: center;
  padding: .5em 0;
  position: relative;
  width: 9em;
}
p:hover {
  animation: tearoff 1s both;
  cursor: default;
  transform-origin: 0 100%;
  z-index: 10;
  -webkit-filter: drop-shadow(1px 1px 2px hsla(0,0%,0%,.25));
}
@keyframes tearoff {
  50% { left: 0; }
  60% { transform: rotate(5deg); }
  100% { left: 1.5em; }
}

Open in new window

0
 

Author Comment

by:Perumal_RM
ID: 41870048
https://codepen.io/dissimulate/pen/KrAwx
something similar which has gift wrapping paper image
0
 
LVL 10

Accepted Solution

by:
Prakash Samariya earned 500 total points
ID: 41870224
@Perumal_RM, I don't think this kind of animation has been created in jQuery yet!

Perhaps, if you are good in jQuery+animation, you can create your own, or you might have to take any one effect of already made animations!

Above links are for your reference only if you find similar kind of animations from it!
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question