78 lines
1.7 KiB
HTML
78 lines
1.7 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
|
<title>HTML5 Deck of Cards</title>
|
||
|
<link href="example.css" rel="stylesheet">
|
||
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,300,600|Ubuntu+Condensed" rel="stylesheet" type="text/css">
|
||
|
|
||
|
<canvas id="canvas-image" width = "1000" height = "1000"></canvas>
|
||
|
|
||
|
<script src="/scripts/granim.min.js"></script>
|
||
|
|
||
|
<script>
|
||
|
var granimInstance = new Granim({
|
||
|
element: '#canvas-image',
|
||
|
name: 'anima',
|
||
|
direction: 'radial',
|
||
|
isPausedWhenNotInView: true,
|
||
|
elToSetClassOn: 'body',
|
||
|
opacity: [1, 1],
|
||
|
image : {
|
||
|
source: '/img/prehension.png',
|
||
|
blendingMode: 'hue',
|
||
|
stretchMode: ['stretch', 'stretch'],
|
||
|
position: ['center', 'center']
|
||
|
},
|
||
|
states : {
|
||
|
"default-state": {
|
||
|
gradients: [
|
||
|
['#834D9B', '#D04ED6'],
|
||
|
['#1CD8D2', '#93EDC7']
|
||
|
],
|
||
|
transitionSpeed: 23*1000
|
||
|
}}});
|
||
|
</script>
|
||
|
|
||
|
<style>
|
||
|
#canvas-image {
|
||
|
position: absolute;
|
||
|
display: block;
|
||
|
width: 100%;
|
||
|
height: 100%;
|
||
|
top: 0;
|
||
|
right: 0;
|
||
|
bottom: 0;
|
||
|
left: 0;
|
||
|
z-index: 0;
|
||
|
}
|
||
|
|
||
|
.card {
|
||
|
/* Black shadow with 10px blur */
|
||
|
filter: drop-shadow(8px 8px 6px black);
|
||
|
position: "absolute";
|
||
|
z-index: 1;
|
||
|
width: 160px;
|
||
|
height: 260px;
|
||
|
}
|
||
|
#card1 { position: absolute; right: 10%; top: 50%; }
|
||
|
#card2 { position: absolute; right: 30%; top: 50%; }
|
||
|
#card3 { position: absolute; right: 40%; top: 50%; }
|
||
|
#card4 { position: absolute; right: 60%; top: 50%; }
|
||
|
|
||
|
</style>
|
||
|
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="container"></div>
|
||
|
|
||
|
<div id="topbar"></div>
|
||
|
|
||
|
<canvas id="canvas-image"></canvas>
|
||
|
|
||
|
<script src="deck.js"></script>
|
||
|
<script src="example.js"></script>
|
||
|
</body>
|
||
|
</html>
|