Светлячки, вылетающие из кнопки на jQuery и HTML5 Canvas
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
#background { display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; } .table { display: table; width: 100%; height: 100%; } .cell { display: table-cell; vertical-align: middle; text-align: center; padding-top: 10px; cursor: pointer; } .excitement { transition: all 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275); position: absolute; top: 0; right: 0; bottom: 0; left: 0; margin: auto; width: 300px; height: 120px; border-radius: 10px; box-shadow: 0 5px 10px 5px rgba(0,0,0,0.2); background: #333333; overflow: hidden; cursor: pointer; z-index: 1000; } .excitement:hover { transform: scale(1.08); } .excitement:active { transform: scale(1); } .excitement::before { position: absolute; width: 250px; height: 180px; content: ""; display: block; top: 0; margin-left: 138px; transform-style: flat; transform: skew(20deg); background: -moz-linear-gradient(top, hsla(0,0%,100%,0.1) 0%, hsla(0,0%,100%,0) 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,hsla(0,0%,100%,0.2)), color-stop(100%,hsla(0,0%,100%,0))); background: -webkit-linear-gradient(top, hsla(0,0%,100%,0.1) 0%,hsla(0,0%,100%,0) 100%); background: -o-linear-gradient(top, hsla(0,0%,100%,0.1) 0%,hsla(0,0%,100%,0) 100%); background: -ms-linear-gradient(top, hsla(0,0%,100%,0.1) 0%,hsla(0,0%,100%,0) 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#42ffffff', endColorstr='#00ffffff',GradientType=0 ); background: linear-gradient(to bottom, hsla(0,0%,100%,0.1) 0%,hsla(0,0%,100%,0) 100%); } .excitement h1 { user-select: none; font-size: 25px!important; text-shadow: 0 2px 2px black; color: #ffd800; font-size: 50px; letter-spacing: 3px; cursor: pointer; } .dg.ac { display: none; } |
1 2 3 4 5 6 7 8 9 10 11 12 |
<div id="background"></div> <div class="excitement"> <div class="table"> <div class="cell"> <h1>Светлячки!!!</h1> </div> </div> </div> <script src='/js/pixi.min.js'></script> <script src='/js/dat.gui.min.js'></script> <script src='/js/fireflies.js'></script> |
Демка не работает :с
Спасибо, починил!