This repository has been archived by the owner on Oct 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhtmlday-element.html
68 lines (68 loc) · 1.8 KB
/
htmlday-element.html
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
<!--
The custom element name identifies a custom element and is a sequence of alphanumeric ASCII characters that must match the NCName production and contain a U+002D HYPHEN-MINUS character.
-->
<element name="htmlday">
<template>
<style>
@host {
* {
display: block;
width: 100%;
}
}
section {
position: relative;
overflow: hidden;
background: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 121, color-stop(0.5, #e7594f), color-stop(0, #d9746d));
background: -webkit-radial-gradient(50% 50%, circle, #d9746d 0%, #e7594f 50%);
background: -moz-radial-gradient(50% 50%, circle, #d9746d 0%, #e7594f 50%);
background: -o-radial-gradient(50% 50%, circle, #d9746d 0%, #e7594f 50%);
background: -ms-radial-gradient(50% 50%, circle, #d9746d 0%, #e7594f 50%);
background: radial-gradient(50% 50%, circle, #d9746d 0%, #e7594f 50%);
padding: 1.8em 1em 1em;
margin: 0;
}
img {
width: 100%;
}
#logo {
position: relative;
z-index: 1;
}
#effect {
position: absolute;
top: 50%;
left: 50%;
margin: -50% 0 0 -50%;
z-index: 0;
}
p {
position: relative;
text-align: center;
font-size: 1.2em;
color: white;
z-index: 1;
margin: 0;
}
</style>
<section>
<h1>
<img id="logo" src="http://www.htmlday.jp/images/logo_htmlday.svg" alt="<htmlday>">
<img id="effect" src="http://www.htmlday.jp/images/header_bg.svg">
<p><content></content></p>
</h1>
</section>
</template>
<script>
Polymer.register(this, {
ready: function(){
var effect = this.$.effect,
deg = 0;
setInterval(function(){
effect.style.webkitTransform = 'rotate3d(0,0,1,' + deg + 'deg)';
deg++;
}, 1000/24);
}
});
</script>
</element>