Cattura i pokemon
CATTURA I POKEMON!
Pokemon catturati:0
Per codare questa pagina e utilisato del HTML:
- <!DOCTYPE html>
- <html lang=”it”>
- <head>
- <meta charset=”UTF-8″>
- <meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
- <title>Pokemon</title>
- </head>
- <body>
- <html onselectstart=’return false’>
- <head >
- <link href=’https://fonts.googleapis.com/css?family=Open+Sans:300′ rel=’stylesheet’ type=’text/css’>
- <style>
- body, a:hover, textarea, input {cursor: url(http://cur.cursors-4u.net/games/gam-13/gam1282.cur), default !important;}
- body {
- font-family: ‘Open Sans’, sans-serif;
- -webkit-transition: 1.0s;
- }
- p {
- padding-left: 42%;
- font-size:32px;
- font-style: bold;
- color:white;
- }
- #sp {
- font-size:25px;
- }
- #tim {
- font-size:30px;
- margin-top:20px;
- border:2px solid white;
- max-width:168px;
- widht:170px;
- height:32px;
- text-align:center;
- padding-bottom:8px;
- border-radius:10px;
- color:white;
- }
- #clck {
- font-size:30px;
- margin-top:20px;
- border:2px solid white;
- max-width:312px;
- height:32px;
- text-align:center;
- padding:2px;
- border-radius:10px;
- color:white;
- margin-top:300px;
- margin-bottom:20px;
- padding-bottom:8px;
- }
- #pole {
- margin:100px;
- margin-left:44%;
- position:relative;
- height:100px;
- width:100px;
- background-image: url(“https://avatanplus.com/files/resources/mid/5677e55bb37de151c457ee57.png”);
- background-size:cover;
- -webkit-transition: 0.4s;
- border-radius:10px;
- }
- .bg{
- background-image: url(“http://orig15.deviantart.net/514e/f/2014/298/5/1/pokemon_x_and_y_battle_background_11_by_phoenixoflight92-d843okx.png”) ;
- background-size:cover;
- background-repeat: no-repeat;
- cursor:url(‘http://i1092.photobucket.com/albums/i418/Sech7/Pokemon/pokeball.png’);
- }
- .empty{
- height:200px;
- }
- </style>
- </head>
- <body class=”bg”>
- <div id=’tim’></div>
- <div class=”empty”>
- <p id=’try’>CATTURA I POKEMON!</p> <span></span>
- <br/>
- <div id=’pole’></div>
- </div>
- <div id=’clck’>Pokemon catturati:0</div>
- <script>
- var pole=document.getElementById(‘pole’);
- var back=document.getElementsByTagName(‘body’)[0];
- var sp=document.getElementsByTagName(‘span’)[0];
- var trr=document.getElementById(‘try’);
- var kyda1,kyda2;
- var lvl=0;
- var hr;
- var vr;
- var timer=60;
- var clck=document.getElementById(‘clck’)
- var intr=setInterval(“time()”,1000)
- function time() {
- tim.innerHTML=’Time:’+timer;
- timer–;
- if (timer==0){location.reload()}
- }
- pole.setAttribute(‘onmousemove’,’setTimeout(“cub()”,75)’);
- pole.setAttribute(‘onclick’,’prs()’);
- function cub() {
- hr=Math.round(Math.random());
- vr=Math.round(Math.random());
- kyda1=Math.round(Math.random()*350);
- kyda2=Math.round(Math.random()*350);
- if (hr==0){
- pole.style.left= kyda1+’px’;
- }
- if (hr==1){
- pole.style.right= kyda1+’px’;
- }
- if (vr==0){
- pole.style.bottom= kyda2+’px’;
- }
- if (vr==1){
- pole.style.top= kyda2+’px’;
- }
- };
- function prs() {
- pole.style.WebkitTransform+=’scale(0.9,0.9)’;
- pole.style.borderRadius=’3px’;
- lvl++;
- clck.innerHTML=’Captured pokemon:’+lvl
- if (lvl>5){
- ultr();
- pole.setAttribute(‘onclick’,’ultr()’);
- }
- };
- function ultr() {
- pole.style.backgroundImage=’url(http://archives.bulbagarden.net/media/upload/6/62/026Raichu_AG_anime.png)’;
- pole.style.backgroundSize=’cover’;
- clck.innerHTML=’Captured pokemon:’+lvl
- lvl++;
- if (lvl==11) {
- trr.innerHTML=”Not bad…”;
- //Нада шось ще придумать
- };
- if (lvl==21) {
- trr.innerHTML=”Поздравляю! Ти достиг уровня джедая…Но до ЧАКА НОРРІСА тобі ще далеко!”;
- trr.style.paddingLeft=’100px’;
- clearInterval(intr);
- };
- }
- </script>
- </body>
- </html>
- </body>
- </html>