

InterviewSolution
Saved Bookmarks
1. |
Olympi game kya hai |
Answer» <html><head> <title>HTML Clock</title><meta name="viewport" content="width=device-width, initial-scale=1.0"><style>body{\tbackground: #334455;}.overlay { height: 0%; width: 100%; position: fixed; z-index: 1; top: 0; left: 0; background-color: rgb(0,0,0); background-color: rgba(0,0,0,0.9); overflow-y: hidden; transition: 0.5s;}.overlay-content { position: relative; top: 25%; width: 100%; text-align: center; margin-top: 30px;}.overlay a { padding: 8px; text-decoration: none; font-size: 36px; color: #818181; display: block; transition: 0.3s;}.overlay a:hover, .overlay a:focus { color: #f1f1f1;}.overlay .closebtn { position: absolute; top: 20px; right: 45px; font-size: 60px;}@media screen and (max-height: 450px){ .overlay {overflow-y: auto;} .overlay a {font-size: 20px} .overlay .closebtn { font-size: 40px; top: 15px; right: 35px; }}#Header{\theight: 50px;\twidth: 400px;\tbackground: #554455;\tfont-size: 30px;}p{\tfont-size: 40px;\tcolor: white;}</style></head><body><div id="myNav" class="overlay"> <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a> <div class="overlay-content"> My other codes: <a href=" https://code.sololearn.com/WJCOmMzdPkA4/?ref=app">Web Demo</a> <a href=" https://code.sololearn.com/W2RMA7B2w56V/?ref=app">Calculator</a> <a href=" https://code.sololearn.com/WEMKLpP5ml2P/?ref=app">Move Me</a> <a href=" https://code.sololearn.com/WU9Y3xLlsF1Z/?ref=app">Progress Bar</a> </div></div><div id="Header"> ☰ HTML Clock v1.0</div><canvas id="canvas" width="350" height="350" style="background-color:#55FFDD"></canvas><script>function openNav() { document.getElementById("myNav") .style.height="100%";}function closeNav() { document.getElementById("myNav") .style.height = "0%";}var canvas = document.getElementById("canvas");var ctx = canvas.getContext("2d");var radius = canvas.height / 2;ctx.translate(radius, radius);radius = radius * 0.90drawClock();function drawClock() { drawFace(ctx, radius); drawNumbers(ctx, radius); drawTime(ctx, radius);//function to draw clockfunction drawFace(ctx, radius) { var grad; ctx.beginPath(); ctx.arc(0, 0, radius, 0, 2 * Math.PI); ctx.fillStyle = \'white\'; ctx.fill(); grad = ctx.createRadialGradient(0, 0 ,radius * 0.95, 0, 0, radius * 1.05); grad.addColorStop(0, \'#333\'); grad.addColorStop(0.5, \'white\'); grad.addColorStop(1, \'#333\'); ctx.strokeStyle = grad; ctx.lineWidth = radius*0.1; ctx.stroke(); ctx.beginPath(); ctx.arc(0, 0, radius * 0.1, 0, 2 * Math.PI); ctx.fillStyle = \'#333\'; ctx.fill();}//function to draw numbersfunction drawNumbers(ctx, radius) { var ang; var num; ctx.font = radius * 0.15 + "px arial"; ctx.textBaseline = "middle"; ctx.textAlign = "center"; for(num = 1; num < 13; num++){ ang = num * Math.PI / 6; ctx.rotate(ang); ctx.translate(0, -radius * 0.85); ctx.rotate(-ang); ctx.fillText(num.toString(), 0, 0); ctx.rotate(ang); ctx.translate(0, radius * 0.85); ctx.rotate(-ang); }}//function to draw hands of clockfunction drawTime(ctx, radius){ var now = new Date(); var hour = now.getHours(); var minute = now.getMinutes(); var second = now.getSeconds(); //hour hour = hour%12; hour = (hour*Math.PI/6)+(minute*Math.PI/(6*60))+(second*Math.PI/(360*60)); drawHand(ctx, hour, radius*0.5, radius*0.07); //minute minute = (minute*Math.PI/30)+(second*Math.PI/(30*60)); drawHand(ctx, minute, radius*0.8, radius*0.07); // second second = (second*Math.PI/30); drawHand(ctx, second, radius*0.9, radius*0.02);}function drawHand(ctx, pos, length, width) { ctx.beginPath(); ctx.lineWidth = width; ctx.lineCap = "round"; ctx.moveTo(0,0); ctx.rotate(pos); ctx.lineTo(0, -length); ctx.stroke(); ctx.rotate(-pos);}}setInterval(drawClock, 1000);</script></body></html><br><html> <head> <title>Simple Clock</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="https://fonts.googleapis.com/css?family=Orbitron" rel="stylesheet"> </head> <body onload="time()"> <div id="cont"> <div class = "loader" > Loading.... </div> </div> <div id="clock" > <div id="hour"></div> <div id="minute"></div> <div id="day"></div> <div id="date"></div> <div id="month"></div> </div> </body></html><br><html> <head> <title>Page Title</title> <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> </head> <body> <div class="game"> <div class="points"> <div></div> </div> <div class="background"></div> <div class="menu" id="menu"> <div class="align"></div> <div class="menuButtons" id="menuButtons"></div> </div> <div class="gameOver" id="gameOver"> <div class="align"></div> <div class="content"> <div class="points"></div> </div> </div> <div class="control" id="control"></div> </div> </body></html><br>When generate the sense of loyalty brother hood and team spirit among the participants<br>Kal | |