Skip to content

Instantly share code, notes, and snippets.

@jacobmoncur
Created July 26, 2012 04:26
Show Gist options
  • Save jacobmoncur/3180253 to your computer and use it in GitHub Desktop.
Save jacobmoncur/3180253 to your computer and use it in GitHub Desktop.
A web page created at CodePen.io.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Tiles &middot; CodePen</title>
<!--
Copyright (c) 2012 jacobmoncur, http://codepen.io/jacobmoncur
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->
<style>
body {
overflow: hidden;
height: 100%;
margin: 0;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
background-color: #222222;
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#111111), to(#333333));
background-image: -webkit-linear-gradient(top, #111111, #333333);
background-image: -moz-linear-gradient(top, #111111, #333333);
background-image: -ms-linear-gradient(top, #111111, #333333);
background-image: -o-linear-gradient(top, #111111, #333333);
background-image: linear-gradient(top, #111111, #333333);
background-repeat: repeat-x;
}
.btn {
position: absolute;
top: 20px;
left: 20px;
z-index: 2;
padding: 8px;
color: #fff;
font-weight: bold;
text-decoration: none;
background-color: #2d88dc;
border-radius: 8px;
-webkit-transition: background-color .2s;
-moz-transition: background-color .2s;
-ms-transition: background-color .2s;
-o-transition: background-color .2s;
transition: background-color .2s;
}
.btn:hover {
background-color: #0b73d5;
}
footer {
position: absolute;
left: 0;
bottom: 100px;
width: 100%;
text-align: center;
font-size: 100px;
color: #000;
text-shadow: 0 -1px 1px rgba(255, 255, 255, 0.1);
}
.tile {
position: absolute;
border: 1px solid #e0e0e0;
background-color: #fff;
z-index: 1;
-webkit-transition-property: left, top, opacity;
-moz-transition-property: left, top, opacity;
-o-transition-property: left, top, opacity;
transition-property: left, top, opacity;
-webkit-transition-duration: 2s, 2s, 2s;
-moz-transition-duration: 2s, 2s, 2s;
-o-transition-duration: 2s, 2s, 2s;
transition-duration: 2s, 2s, 2s;
-webkit-transform: rotatez(0deg);
-moz-transform: rotatez(0deg);
-ms-transform: rotatez(0deg);
-o-transform: rotatez(0deg);
transform: rotatez(0deg);
}
.diamond {
-webkit-transform: rotate(45deg) rotatez(0deg);
-moz-transform: rotate(45deg) rotatez(0deg);
-ms-transform: rotate(45deg) rotatez(0deg);
-o-transform: rotate(45deg) rotatez(0deg);
transform: rotate(45deg) rotatez(0deg);
}
.dark {
border: 1px solid #222;
}
.pulse {
-webkit-animation-name: square-pulse;
-moz-animation-name: square-pulse;
-ms-animation-name: square-pulse;
-o-animation-name: square-pulse;
animation-name: square-pulse;
-webkit-animation-duration: 1.5s;
-moz-animation-duration: 1.5s;
-ms-animation-duration: 1.5s;
-o-animation-duration: 1.5s;
animation-name: 1.5s;
}
.diamond.pulse {
-webkit-animation-name: diamond-pulse;
-moz-animation-name: diamond-pulse;
-ms-animation-name: diamond-pulse;
-o-animation-name: diamond-pulse;
animation-name: diamond-pulse;
-webkit-animation-duration: 1.5s;
-moz-animation-duration: 1.5s;
-ms-animation-duration: 1.5s;
-o-animation-duration: 1.5s;
animation-name: 1.5s;
}
@-webkit-keyframes square-pulse {
0% {
-webkit-transform: scale(1) rotatez(0deg);
-moz-transform: scale(1) rotatez(0deg);
-ms-transform: scale(1) rotatez(0deg);
-o-transform: scale(1) rotatez(0deg);
transform: scale(1) rotatez(0deg);
}
50% {
-webkit-transform: scale(0.9) rotatez(0deg);
-moz-transform: scale(0.9) rotatez(0deg);
-ms-transform: scale(0.9) rotatez(0deg);
-o-transform: scale(0.9) rotatez(0deg);
transform: scale(0.9) rotatez(0deg);
}
100% {
-webkit-transform: scale(1) rotatez(0deg);
-moz-transform: scale(1) rotatez(0deg);
-ms-transform: scale(1) rotatez(0deg);
-o-transform: scale(1) rotatez(0deg);
transform: scale(1) rotatez(0deg);
}
}
@-moz-keyframes square-pulse {
0% {
-webkit-transform: scale(1) rotatez(0deg);
-moz-transform: scale(1) rotatez(0deg);
-ms-transform: scale(1) rotatez(0deg);
-o-transform: scale(1) rotatez(0deg);
transform: scale(1) rotatez(0deg);
}
50% {
-webkit-transform: scale(0.9) rotatez(0deg);
-moz-transform: scale(0.9) rotatez(0deg);
-ms-transform: scale(0.9) rotatez(0deg);
-o-transform: scale(0.9) rotatez(0deg);
transform: scale(0.9) rotatez(0deg);
}
100% {
-webkit-transform: scale(1) rotatez(0deg);
-moz-transform: scale(1) rotatez(0deg);
-ms-transform: scale(1) rotatez(0deg);
-o-transform: scale(1) rotatez(0deg);
transform: scale(1) rotatez(0deg);
}
}
@-webkit-keyframes diamond-pulse {
0% {
-webkit-transform: scale(1) rotate(45deg) rotatez(0deg);
-moz-transform: scale(1) rotate(45deg) rotatez(0deg);
-ms-transform: scale(1) rotate(45deg) rotatez(0deg);
-o-transform: scale(1) rotate(45deg) rotatez(0deg);
transform: scale(1) rotate(45deg) rotatez(0deg);
}
50% {
-webkit-transform: scale(0.9) rotate(45deg) rotatez(0deg);
-moz-transform: scale(0.9) rotate(45deg) rotatez(0deg);
-ms-transform: scale(0.9) rotate(45deg) rotatez(0deg);
-o-transform: scale(0.9) rotate(45deg) rotatez(0deg);
transform: scale(0.9) rotate(45deg) rotatez(0deg);
}
100% {
-webkit-transform: scale(1) rotate(45deg) rotatez(0deg);
-moz-transform: scale(1) rotate(45deg) rotatez(0deg);
-ms-transform: scale(1) rotate(45deg) rotatez(0deg);
-o-transform: scale(1) rotate(45deg) rotatez(0deg);
transform: scale(1) rotate(45deg) rotatez(0deg);
}
}
@-moz-keyframes diamond-pulse {
0% {
-webkit-transform: scale(1) rotate(45deg) rotatez(0deg);
-moz-transform: scale(1) rotate(45deg) rotatez(0deg);
-ms-transform: scale(1) rotate(45deg) rotatez(0deg);
-o-transform: scale(1) rotate(45deg) rotatez(0deg);
transform: scale(1) rotate(45deg) rotatez(0deg);
}
50% {
-webkit-transform: scale(0.9) rotate(45deg) rotatez(0deg);
-moz-transform: scale(0.9) rotate(45deg) rotatez(0deg);
-ms-transform: scale(0.9) rotate(45deg) rotatez(0deg);
-o-transform: scale(0.9) rotate(45deg) rotatez(0deg);
transform: scale(0.9) rotate(45deg) rotatez(0deg);
}
100% {
-webkit-transform: scale(1) rotate(45deg) rotatez(0deg);
-moz-transform: scale(1) rotate(45deg) rotatez(0deg);
-ms-transform: scale(1) rotate(45deg) rotatez(0deg);
-o-transform: scale(1) rotate(45deg) rotatez(0deg);
transform: scale(1) rotate(45deg) rotatez(0deg);
}
}
</style>
<style>
#codepen-footer, #codepen-footer * {
-webkit-box-sizing: border-box !important;
-moz-box-sizing: border-box !important;
box-sizing: border-box !important;
}
#codepen-footer {
display: block !important;
position: fixed !important;
bottom: 0 !important;
left: 0 !important;
width: 100% !important;
padding: 0 10px !important;
margin: 0 !important;
height: 30px !important;
line-height: 30px !important;
font-size: 12px !important;
color: #eeeeee !important;
background-color: #505050 !important;
text-align: left !important;
background: -webkit-linear-gradient(top, #505050, #383838) !important;
background: -moz-linear-gradient(top, #505050, #383838) !important;
background: -ms-linear-gradient(top, #505050, #383838) !important;
background: -o-linear-gradient(top, #505050, #383838) !important;
border-top: 1px solid black !important;
border-bottom: 1px solid black !important;
border-radius: 0 !important;
border-image: none !important;
box-shadow: inset 0 1px 0 #6e6e6e, 0 2px 2px rgba(0, 0, 0, 0.4) !important;
z-index: 300 !important;
font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, sans-serif !important;
letter-spacing: 0 !important;
word-spacing: normal !important;
word-spacing: 0 !important;
-webkit-transform: none !important;
-moz-transform: none !important;
-ms-transform: none !important;
-o-transform: none !important;
transform: none !important;
}
#codepen-footer a {
color: #a7a7a7 !important;
text-decoration: none !important;
text-shadow: none !important;
border: 0 !important;
}
#codepen-footer a:hover {
color: white !important;
}
</style>
<script>
// Kill alerts, confirmations and prompts
// window.alert = function(){}; we're going to allow alerts for now
window.confirm = function(){};
window.prompt = function(){};
window.open = function(){};
window.print = function(){};
</script>
</head>
<body>
<a id="next" class="btn" href="#">Next</a>
<div>Jacob</div>
<footer>i like tiles</footer>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
(function() {
var root = this;
var Tiles = root.Tiles = {};
var width;
var height;
var tiles = [];
var options;
function Tile(column, row, size, diamond, dark) {
this.column = column;
this.row = row;
this.size = size;
this.diamond = diamond;
this.$el = $(document.createElement('div'));
this.$el.addClass('tile');
if (diamond === true) {
this.$el.addClass('diamond');
}
if (dark === true) {
this.$el.addClass('dark');
}
this.colorize(dark, row);
this.$el.css({
'left': size * -1,
'top': size * -1,
'width': size,
'height': size,
'opacity': 0,
'background': 'rgb(' + this.r + ',' + this.g + ',' + this.b + ')'
});
this.addListeners();
}
Tile.prototype.colorize = function (dark, row) {
if (dark === true) {
this.r = 0;
this.g = 0 + (row * 3);
this.b = 0 + (row * 6);
} else {
this.r = 255 - (row * 6);
this.g = 255 - (row * 3);
this.b = 255;
}
}
Tile.prototype.position = function (delay) {
var self = this;
setTimeout(function () {
var hyp = Math.sqrt(self.size * self.size + self.size * self.size);
var left;
var top;
self.$el.addClass('active');
if (self.diamond === true) {
left = self.column * hyp;
top = self.row * (hyp / 2) - (hyp / 2);
if (self.row % 2 === 0) {
left -= hyp / 2;
}
} else {
left = self.column * self.size;
top = self.row * self.size;
}
self.$el.css({
'left': left,
'top': top,
'opacity': 1
});
}, delay);
}
Tile.prototype.addListeners = function () {
this.$el.on('mouseover', this.onMouseOver);
this.$el.on('webkitAnimationEnd', this.onAnimationEnd);
this.$el.on('animationend', this.onAnimationEnd);
}
Tile.prototype.removeListeners = function () {
this.$el.off('mouseover', this.onMouseOver);
this.$el.off('webkitAnimationEnd', this.onAnimationEnd);
this.$el.off('animationend', this.onAnimationEnd);
}
Tile.prototype.colorize = function (dark, row) {
if (dark === true) {
this.r = 0;
this.g = 0 + (row * 1);
this.b = 0 + (row * 4);
} else {
this.r = 255 - (row * 4);
this.g = 255 - (row * 1);
this.b = 255;
}
}
Tile.prototype.onMouseOver = function () {
$(this).addClass('pulse');
}
Tile.prototype.onAnimationEnd = function () {
$(this).removeClass('pulse');
}
Tiles.init = function () {
width = window.innerWidth;
height = window.innerHeight;
}
Tiles.create = function (params) {
var hyp = Math.sqrt(params.size * params.size + params.size * params.size);
var columns;
var rows;
var i;
var j;
// Clean up old tiles
if (tiles.length > 1) {
Tiles.destroy(tiles.shift());
}
if (tiles.length > 0) {
for (i = 0; i < tiles[0].length; i++) {
tiles[0][i].removeListeners();
}
}
tiles.push([]);
if (params.diamond === true) {
columns = Math.ceil(width / hyp) + 2;
rows = Math.ceil(height / (hyp / 2)) + 2;
} else {
columns = Math.ceil(width / params.size);
rows = Math.ceil(height / params.size);
}
for (i = 0; i < columns; i++) {
for (j = 0; j < rows; j++) {
var tile = new Tile(i, j, params.size, params.diamond, params.dark);
// Add the tile to the DOM
$('body').append(tile.$el);
tiles[tiles.length - 1].push(tile);
}
}
if (params.shuffle === true) {
randomize(tiles[tiles.length - 1]);
}
for (i = 0; i < tiles[tiles.length - 1].length; i++) {
tiles[tiles.length - 1][i].position(i * params.delay);
}
options = params;
}
Tiles.destroyAll = function () {
for (var i = 0; i < tiles.length; i++) {
for (var j = 0; j < tiles[i].length; j++) {
tiles[i][j].$el.remove();
}
}
tiles.length = 0;
}
Tiles.destroy = function (layer) {
for (var i = 0; i < layer.length; i++) {
var tile = layer[i];
tile.removeListeners();
tile.$el.remove();
}
layer.length = 0;
}
function randomize(a) {
var len = a.length;
var i = len;
while (i--) {
var p = parseInt(Math.random()*len);
var t = a[i];
a[i] = a[p];
a[p] = t;
}
}
var count = 2;
var diamond = false;
var dark = false;
Tiles.init();
Tiles.create({
size: 150,
delay: 10,
diamond: diamond,
dark: dark
});
$('#next').on('click', function () {
diamond = (count % 3 == 0);
dark = !dark;
Tiles.create({
size: 150,
delay: 10,
diamond: diamond,
dark: dark
});
count++;
return false;
});
})();
</script>
<div id="codepen-footer">
<a style="color: #f73535 !important;" href="https://codepen.wufoo.com/forms/m7x3r3/def/field14=" onclick="window.open(this.href, null, 'height=517, width=680, toolbar=0, location=0, status=1, scrollbars=1, resizable=1'); return false">Report Abuse</a>
&nbsp;
<a href="/jacobmoncur/pen/vezAj" target="_blank">Edit this Pen</a>
</div>
</body>
</html>
var root = this;
var Tiles = root.Tiles = {};
var width;
var height;
var tiles = [];
var options;
function Tile(column, row, size, diamond, dark) {
this.column = column;
this.row = row;
this.size = size;
this.diamond = diamond;
this.$el = $(document.createElement('div'));
this.$el.addClass('tile');
if (diamond === true) {
this.$el.addClass('diamond');
}
if (dark === true) {
this.$el.addClass('dark');
}
this.colorize(dark, row);
this.$el.css({
'left': size * -1,
'top': size * -1,
'width': size,
'height': size,
'opacity': 0,
'background': 'rgb(' + this.r + ',' + this.g + ',' + this.b + ')'
});
this.addListeners();
}
Tile.prototype.colorize = function (dark, row) {
if (dark === true) {
this.r = 0;
this.g = 0 + (row * 3);
this.b = 0 + (row * 6);
} else {
this.r = 255 - (row * 6);
this.g = 255 - (row * 3);
this.b = 255;
}
}
Tile.prototype.position = function (delay) {
var self = this;
setTimeout(function () {
var hyp = Math.sqrt(self.size * self.size + self.size * self.size);
var left;
var top;
self.$el.addClass('active');
if (self.diamond === true) {
left = self.column * hyp;
top = self.row * (hyp / 2) - (hyp / 2);
if (self.row % 2 === 0) {
left -= hyp / 2;
}
} else {
left = self.column * self.size;
top = self.row * self.size;
}
self.$el.css({
'left': left,
'top': top,
'opacity': 1
});
}, delay);
}
Tile.prototype.addListeners = function () {
this.$el.on('mouseover', this.onMouseOver);
this.$el.on('webkitAnimationEnd', this.onAnimationEnd);
this.$el.on('animationend', this.onAnimationEnd);
}
Tile.prototype.removeListeners = function () {
this.$el.off('mouseover', this.onMouseOver);
this.$el.off('webkitAnimationEnd', this.onAnimationEnd);
this.$el.off('animationend', this.onAnimationEnd);
}
Tile.prototype.colorize = function (dark, row) {
if (dark === true) {
this.r = 0;
this.g = 0 + (row * 1);
this.b = 0 + (row * 4);
} else {
this.r = 255 - (row * 4);
this.g = 255 - (row * 1);
this.b = 255;
}
}
Tile.prototype.onMouseOver = function () {
$(this).addClass('pulse');
}
Tile.prototype.onAnimationEnd = function () {
$(this).removeClass('pulse');
}
Tiles.init = function () {
width = window.innerWidth;
height = window.innerHeight;
}
Tiles.create = function (params) {
var hyp = Math.sqrt(params.size * params.size + params.size * params.size);
var columns;
var rows;
var i;
var j;
// Clean up old tiles
if (tiles.length > 1) {
Tiles.destroy(tiles.shift());
}
if (tiles.length > 0) {
for (i = 0; i < tiles[0].length; i++) {
tiles[0][i].removeListeners();
}
}
tiles.push([]);
if (params.diamond === true) {
columns = Math.ceil(width / hyp) + 2;
rows = Math.ceil(height / (hyp / 2)) + 2;
} else {
columns = Math.ceil(width / params.size);
rows = Math.ceil(height / params.size);
}
for (i = 0; i < columns; i++) {
for (j = 0; j < rows; j++) {
var tile = new Tile(i, j, params.size, params.diamond, params.dark);
// Add the tile to the DOM
$('body').append(tile.$el);
tiles[tiles.length - 1].push(tile);
}
}
if (params.shuffle === true) {
randomize(tiles[tiles.length - 1]);
}
for (i = 0; i < tiles[tiles.length - 1].length; i++) {
tiles[tiles.length - 1][i].position(i * params.delay);
}
options = params;
}
Tiles.destroyAll = function () {
for (var i = 0; i < tiles.length; i++) {
for (var j = 0; j < tiles[i].length; j++) {
tiles[i][j].$el.remove();
}
}
tiles.length = 0;
}
Tiles.destroy = function (layer) {
for (var i = 0; i < layer.length; i++) {
var tile = layer[i];
tile.removeListeners();
tile.$el.remove();
}
layer.length = 0;
}
function randomize(a) {
var len = a.length;
var i = len;
while (i--) {
var p = parseInt(Math.random()*len);
var t = a[i];
a[i] = a[p];
a[p] = t;
}
}
var count = 2;
var diamond = false;
var dark = false;
Tiles.init();
Tiles.create({
size: 150,
delay: 10,
diamond: diamond,
dark: dark
});
$('#next').on('click', function () {
diamond = (count % 3 == 0);
dark = !dark;
Tiles.create({
size: 150,
delay: 10,
diamond: diamond,
dark: dark
});
count++;
return false;
});
<a id="next" class="btn" href="#">Next</a>
<div>Jacob</div>
<footer>i like tiles</footer>
body {
overflow: hidden;
height: 100%;
margin: 0;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
background-color: #222222;
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#111111), to(#333333));
background-image: -webkit-linear-gradient(top, #111111, #333333);
background-image: -moz-linear-gradient(top, #111111, #333333);
background-image: -ms-linear-gradient(top, #111111, #333333);
background-image: -o-linear-gradient(top, #111111, #333333);
background-image: linear-gradient(top, #111111, #333333);
background-repeat: repeat-x;
}
.btn {
position: absolute;
top: 20px;
left: 20px;
z-index: 2;
padding: 8px;
color: #fff;
font-weight: bold;
text-decoration: none;
background-color: #2d88dc;
border-radius: 8px;
-webkit-transition: background-color .2s;
-moz-transition: background-color .2s;
-ms-transition: background-color .2s;
-o-transition: background-color .2s;
transition: background-color .2s;
}
.btn:hover {
background-color: #0b73d5;
}
footer {
position: absolute;
left: 0;
bottom: 100px;
width: 100%;
text-align: center;
font-size: 100px;
color: #000;
text-shadow: 0 -1px 1px rgba(255, 255, 255, 0.1);
}
.tile {
position: absolute;
border: 1px solid #e0e0e0;
background-color: #fff;
z-index: 1;
-webkit-transition-property: left, top, opacity;
-moz-transition-property: left, top, opacity;
-o-transition-property: left, top, opacity;
transition-property: left, top, opacity;
-webkit-transition-duration: 2s, 2s, 2s;
-moz-transition-duration: 2s, 2s, 2s;
-o-transition-duration: 2s, 2s, 2s;
transition-duration: 2s, 2s, 2s;
-webkit-transform: rotatez(0deg);
-moz-transform: rotatez(0deg);
-ms-transform: rotatez(0deg);
-o-transform: rotatez(0deg);
transform: rotatez(0deg);
}
.diamond {
-webkit-transform: rotate(45deg) rotatez(0deg);
-moz-transform: rotate(45deg) rotatez(0deg);
-ms-transform: rotate(45deg) rotatez(0deg);
-o-transform: rotate(45deg) rotatez(0deg);
transform: rotate(45deg) rotatez(0deg);
}
.dark {
border: 1px solid #222;
}
.pulse {
-webkit-animation-name: square-pulse;
-moz-animation-name: square-pulse;
-ms-animation-name: square-pulse;
-o-animation-name: square-pulse;
animation-name: square-pulse;
-webkit-animation-duration: 1.5s;
-moz-animation-duration: 1.5s;
-ms-animation-duration: 1.5s;
-o-animation-duration: 1.5s;
animation-name: 1.5s;
}
.diamond.pulse {
-webkit-animation-name: diamond-pulse;
-moz-animation-name: diamond-pulse;
-ms-animation-name: diamond-pulse;
-o-animation-name: diamond-pulse;
animation-name: diamond-pulse;
-webkit-animation-duration: 1.5s;
-moz-animation-duration: 1.5s;
-ms-animation-duration: 1.5s;
-o-animation-duration: 1.5s;
animation-name: 1.5s;
}
@-webkit-keyframes square-pulse {
0% {
-webkit-transform: scale(1) rotatez(0deg);
-moz-transform: scale(1) rotatez(0deg);
-ms-transform: scale(1) rotatez(0deg);
-o-transform: scale(1) rotatez(0deg);
transform: scale(1) rotatez(0deg);
}
50% {
-webkit-transform: scale(0.9) rotatez(0deg);
-moz-transform: scale(0.9) rotatez(0deg);
-ms-transform: scale(0.9) rotatez(0deg);
-o-transform: scale(0.9) rotatez(0deg);
transform: scale(0.9) rotatez(0deg);
}
100% {
-webkit-transform: scale(1) rotatez(0deg);
-moz-transform: scale(1) rotatez(0deg);
-ms-transform: scale(1) rotatez(0deg);
-o-transform: scale(1) rotatez(0deg);
transform: scale(1) rotatez(0deg);
}
}
@-moz-keyframes square-pulse {
0% {
-webkit-transform: scale(1) rotatez(0deg);
-moz-transform: scale(1) rotatez(0deg);
-ms-transform: scale(1) rotatez(0deg);
-o-transform: scale(1) rotatez(0deg);
transform: scale(1) rotatez(0deg);
}
50% {
-webkit-transform: scale(0.9) rotatez(0deg);
-moz-transform: scale(0.9) rotatez(0deg);
-ms-transform: scale(0.9) rotatez(0deg);
-o-transform: scale(0.9) rotatez(0deg);
transform: scale(0.9) rotatez(0deg);
}
100% {
-webkit-transform: scale(1) rotatez(0deg);
-moz-transform: scale(1) rotatez(0deg);
-ms-transform: scale(1) rotatez(0deg);
-o-transform: scale(1) rotatez(0deg);
transform: scale(1) rotatez(0deg);
}
}
@-webkit-keyframes diamond-pulse {
0% {
-webkit-transform: scale(1) rotate(45deg) rotatez(0deg);
-moz-transform: scale(1) rotate(45deg) rotatez(0deg);
-ms-transform: scale(1) rotate(45deg) rotatez(0deg);
-o-transform: scale(1) rotate(45deg) rotatez(0deg);
transform: scale(1) rotate(45deg) rotatez(0deg);
}
50% {
-webkit-transform: scale(0.9) rotate(45deg) rotatez(0deg);
-moz-transform: scale(0.9) rotate(45deg) rotatez(0deg);
-ms-transform: scale(0.9) rotate(45deg) rotatez(0deg);
-o-transform: scale(0.9) rotate(45deg) rotatez(0deg);
transform: scale(0.9) rotate(45deg) rotatez(0deg);
}
100% {
-webkit-transform: scale(1) rotate(45deg) rotatez(0deg);
-moz-transform: scale(1) rotate(45deg) rotatez(0deg);
-ms-transform: scale(1) rotate(45deg) rotatez(0deg);
-o-transform: scale(1) rotate(45deg) rotatez(0deg);
transform: scale(1) rotate(45deg) rotatez(0deg);
}
}
@-moz-keyframes diamond-pulse {
0% {
-webkit-transform: scale(1) rotate(45deg) rotatez(0deg);
-moz-transform: scale(1) rotate(45deg) rotatez(0deg);
-ms-transform: scale(1) rotate(45deg) rotatez(0deg);
-o-transform: scale(1) rotate(45deg) rotatez(0deg);
transform: scale(1) rotate(45deg) rotatez(0deg);
}
50% {
-webkit-transform: scale(0.9) rotate(45deg) rotatez(0deg);
-moz-transform: scale(0.9) rotate(45deg) rotatez(0deg);
-ms-transform: scale(0.9) rotate(45deg) rotatez(0deg);
-o-transform: scale(0.9) rotate(45deg) rotatez(0deg);
transform: scale(0.9) rotate(45deg) rotatez(0deg);
}
100% {
-webkit-transform: scale(1) rotate(45deg) rotatez(0deg);
-moz-transform: scale(1) rotate(45deg) rotatez(0deg);
-ms-transform: scale(1) rotate(45deg) rotatez(0deg);
-o-transform: scale(1) rotate(45deg) rotatez(0deg);
transform: scale(1) rotate(45deg) rotatez(0deg);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment