JS Click on the page to float out the text 2

Source: Internet
Author: User

<style>.animate{Animation:myfirst 3s; -moz-user-select:none;/* Firefox */-webkit-user-select:none;/*webkit Browser */-ms-user-select:none;/*ie10*/-khtml-user-sel ect:none;/* Early Browser */User-select:none;}    @keyframes myfirst{0% {transform:scale (1);}    10% {Transform:scale (1.2);}    20% {Transform:scale (1);}    30% {Transform:scale (1.2);}    40% {Transform:scale (1);}    50% {Transform:scale (1.2);}    60% {Transform:scale (1);}    70% {Transform:scale (1.2);}    80% {Transform:scale (1);}    90% {Transform:scale (1.2);} 100% {Transform:scale (1);}}  </style><script>$ (document). Click (function (e) {var list = [' Learning and Time learning ', ' not also speaking ', ' having friends come from afar ', ' exhilaration ', ' people don't know but not get mad bland ',    ' Not also a gentleman ', ' the three will have my Teacher Yan ', ' choose its good people and from it ', ' its poor people and change ', ' learn without thinking then ', ' thinking without learning ';    var lists = Math.floor (Math.random () * list.length);    var colors = ' # ' +math.floor (Math.random () *0xffffff). toString (16);    var $i = $ (' <span class= ' animate '/> '). Text (list[lists]); var xx = E.PAGeX | |    E.clientx + document.body.scroolLeft; var yy = E.pagey | |    E.clienty + Document.body.scrollTop;    $ (' body '). Append ($i);  $i. css ({top:yy, left:xx, color:colors, transform: ' Translate ( -50%, -50%) ', display:  ' Block ', Position: ' Absolute ', zindex:999999999999}) $i. Animate ({top:yy, opacity:    .5}, N, function () {$i. Remove (); }) </script>

JS Click on the page to float out the text 2

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.