Memasang kode Christmas Snowfall with audio
Code ini menggunakan CSS dan HTML serta Js. Untuk menerapkan kode tersebut Langkah awal Login ke akun blog klik tombol blog baru, buat satubuah link baru kemudian beri nama sesuai fungsi, klik Edit HTML pada link baru tersebut, hapus semua kode template
ganti dengan kode blank template, yang tersedia pada sumber berikut ini Get Blank Template edit background warna sesuai keinginan dan klik simpan selesai
Code ini menggunakan CSS dan HTML serta Js. Untuk menerapkan kode tersebut Langkah awal Login ke akun blog klik tombol blog baru, buat satubuah link baru kemudian beri nama sesuai fungsi, klik Edit HTML pada link baru tersebut, hapus semua kode template
ganti dengan kode blank template, yang tersedia pada sumber berikut ini Get Blank Template edit background warna sesuai keinginan dan klik simpan selesai
Kemudian klik entri halaman baru HTML pada link tersebut
copy kode dibawah ini, pastekan kedalam halaman baru tersebut dan klik simpan selesai
copy kode dibawah ini, pastekan kedalam halaman baru tersebut dan klik simpan selesai
<style> body {);color:red;height:100%;overflow:hidden;} header { -o-transition-duration: 0.3s; -moz-transition-duration: 0.3s; -webkit-transition-duration: 0.3s; transition-duration: 0.3s; padding: -2px 0; position: fixed; top: 0; width: 100%; background: #00008B; border-bottom: 3px solid #dad; } /* GRADIEND */ .ap { position: fixed; right: 0; bottom: 0; left: 0; height: 60px; margin: auto; font-family: Arial, sans-serif; font-size: 14px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; color: #333; background: #9400D3 ; border-top: 2px solid #f0f; z-index: 9999; }
/*Image Full*/ * {margin: 0; padding: 0;} body { /* Image */ background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrz26Px6WAAWfWQKk-nRyXI6xAtTyMvxWsY61XU9hG-Qna7jgeB7qabQBQYC-l8DIucSoiQ1URoulh7jd5UP9EtmQDDHaLtTU-LzFsmeOPzRkj4cuv7pdWA28zWl4AERtpBVxk3cymc-4Y/s1600-r/bg-mys2010.jpg); background-position: center center; background-repeat: no-repeat; background-attachment: fixed; background-size: 1200px 555px; }
html,body { height: 100%; width: 100%; margin: 0; padding: 0; } canvas { position: absolute; } /* Requires font-awesome */ .player { box-sizing: border-box; -moz-box-sizing: border-box; width: 210px; height: 100px; background: ##; border-radius: 10px; padding: 10px; font-size: 16px; color: #00008B; font-family: arial, sans-serif; } .player .source-ctrl-container { height: 50px; width: 50px; background: ##; border-radius: 50%; float: left; position: relative; cursor: pointer; color: #000;} .player .volume-ctrl-container { box-sizing: border-box; -moz-box-sizing: border-box; padding-top: 10px; height: 50px; width: 118px; float: right; } .player .fa-pause { position: absolute; top: 18px; left: 18px; } .player .fa-play { position: absolute; top: 18px; left: 20px; }.player .time-info { clear: both; position: relative; top: 8px; text-align: center; font-size: 13px; } .player .time-current { color: #8A2BE2; } .player .volume-slider { display: inline-block; height: 2px; width: 50px; background: #0000FF; margin: 0 10px; position: relative; top: -10px; }.player .volume-knob { background: #111; width: 13px; height: 13px; border-radius: 50%; position: relative; top: -6px; }
<canvas id="canvas"></canvas> <header> <div class="Top Title Header"> <div align="center"> <a href="http://demoshow-mys2010.blogspot.co.id/2016/04/xmast-sungguh2.html" title="Tukar Gambar"><b>EXCHANGE PICTURES</b></a> </div> </header> <!-- GRADIEND --> <div class="ap" id="ap"> <div align="center"> <audio id="player"> <source src="https://sites.google.com/site/gg1cover/music/sungguh-Mys2010s.mp3" type="audio/mpeg"> </audio><link rel='stylesheet prefetch' href='//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css'> <script src='//assets.codepen.io/assets/common/stopExecutionOnTimeout.js?t=1'></script><script src='//ajax.googleapis.com/ajax/libs/mootools/1.4.5/mootools-yui-compressed.js'></script><script src='http://cdnjs.cloudflare.com/ajax/libs/mootools-more/1.4.0.1/mootools-more-yui-compressed.js'></script>
<script> /** * Requires mootools core and mootools more Slider */ var Player = function(audio_element, options) { this.audio_obj = document.id(audio_element); this.options = options; this.init = function() { this.status = 'pause'; //this.duration = this.audio_obj.duration; this.time = '00'; this.render(); this.addEvents(); }; this.render = function() { // source controller this.source_ctrl_el = new Element('div.source-ctrl.fa.fa-play'); this.source_ctrl_button = new Element('div.source-ctrl-container') .adopt(this.source_ctrl_el); // time info this.time_current_el = new Element('span.time-current'); this.time_duration_el = new Element('span.time-duration'); var time_info = new Element('div.time-info') .adopt( this.time_current_el, new Element('span.time-current-duration-separator').set('text', ' / '), this.time_duration_el ); // volume ctrl this.volume_slider = new Element('div.volume-slider'); this.volume_ctrl = new Element('div.volume-ctrl') .adopt( new Element('span.fa.fa-2x.fa-volume-off'), this.volume_slider.adopt( new Element('div.volume-knob')), new Element('span.fa.fa-2x.fa-volume-up') ); var container = new Element('div.player') .adopt( this.source_ctrl_button, new Element('div.volume-ctrl-container').adopt(this.volume_ctrl), time_info ) .inject(this.audio_obj, 'after'); }; this.addEvents = function() { this.audio_obj.load(); this.audio_obj.addEventListener('loadeddata', function() { this.time_duration_el.set('text', this.toHHMMSS(this.audio_obj.duration)); this.time_current_el.set('text', this.toHHMMSS(this.audio_obj.currentTime)); }.bind(this)); this.source_ctrl_button.addEvent('click', this.sourceCtrlAction.bind(this)); new Slider(this.volume_slider, this.volume_slider.getElement('.volume-knob'), { range: [0, 100], initialStep: this.audio_obj.volume * 100, onChange: function(value){ this.audio_obj.volume = value/100; }.bind(this) }); }; this.sourceCtrlAction = function() { if(this.status == 'pause') { this.play(); } else { this.pause(); } }; this.toHHMMSS = function(s) { var sec_num = parseInt(s, 10); var hours = Math.floor(sec_num / 3600); var minutes = Math.floor((sec_num - (hours * 3600)) / 60); var seconds = sec_num - (hours * 3600) - (minutes * 60); if(hours < 10) { hours = "0" + hours; } if(minutes < 10) { minutes = "0" + minutes; } if(seconds < 10) { seconds = "0" + seconds; } var time = (hours == '00' ? '' : hours + ':') + minutes + ':' + seconds; return time; } this.play = function() { this.time_current_el.set('text', this.toHHMMSS(this.audio_obj.currentTime)); this.time_ti = setInterval(function() { this.time_current_el.set('text', this.toHHMMSS(this.audio_obj.currentTime)); }.bind(this), 1000); this.source_ctrl_el.removeClass('fa-play').addClass('fa-pause'); this.audio_obj.play(); this.status = 'play'; }; this.pause = function() { clearInterval(this.time_ti); this.source_ctrl_el.removeClass('fa-pause').addClass('fa-play'); this.audio_obj.pause(); this.status = 'pause'; }; } var player = new Player('player'); player.init(); </script> <snow> <script src='//dmnbd74khqk5q.cloudfront.net/assets/common/stopExecutionOnTimeout.js?t=1'></script> <script>function Flake(x,y,vx,vy,s) { this.x = x; this.y = y; this.vx = vx; this.mx = Math.abs(vx * 2); this.vy = vy; this.my = vy; this.s = s; this.seed = Math.random() * 1e12; /// var canvas = document.createElement('canvas'), context = canvas.getContext('2d'), height = canvas.height = s * 2, width = canvas.width = s * 2, grad = context.createRadialGradient(s, s, 1, s, s, s); grad.addColorStop(0, 'rgba(255,255,255,.66)'); grad.addColorStop(1, 'rgba(255,255,255,0)'); context.beginPath(); context.arc(s, s, s, 0, Math.PI * 2, !0); context.fillStyle = grad; context.fill(); context.closePath(); this.img = canvas; } Flake.prototype = { constructor: Flake, update: function() { this.x += this.vx; this.y += this.vy; if( this.x > width + this.s * 2 ) { this.x = 0 - this.s * 2; } if( this.x < 0 - this.s * 2 ) { this.x = width + this.s * 2; } if( this.y > height + this.s * 2 ) { this.y = 0 - this.s * 2; } if( this.y < 0 - this.s * 2 ) { this.y = height + this.s * 2; } if( Math.abs(this.vx) > this.mx ) { this.vx = this.vs > 0 ? this.mx : -1 * this.mx; } // direction modification is kinda cheap... this.vx += Math.sin(Date.now() + this.seed)/100; if( this.vy < this.my ) { this.vy += this.my/10; } } }; var canvas, context, height, width, snow_count, hand_size, snow; setTimeout(init, 10); function init() { canvas = document.getElementById('canvas'); context = canvas.getContext('2d'); height = canvas.height = document.body.offsetHeight; width = canvas.width = document.body.offsetWidth; snow_count = 128; hand_size = 32; snow = []; for( var i = 0; i < snow_count; i++ ) { var x = Math.random() * width, y = Math.random() * height, s = Math.random() * 2.5 + 2.5, vx = Math.random() * 2 - 1, vy = Math.random() + s/2.5; snow.push(new Flake(x,y,vx,vy,s)); } canvas.onmousemove = function(e) { for( var i = 0; i < snow_count; i++ ) { var dx = snow[i].x - e.clientX, dy = snow[i].y - e.clientY, d = Math.sqrt(dx*dx + dy*dy); if( d < hand_size ) { var r = Math.atan2(dy, dx); snow[i].vx = 2 * Math.cos(r); snow[i].vy = 2 * Math.sin(r); } } }; update(); render(); } function update() { for( var i = 0; i < snow_count; i++ ) { snow[i].update(); } setTimeout(update, 1000/30); } function render() { context.clearRect(0, 0, width, height); for( var i = 0; i < snow_count; i++ ) { context.drawImage(snow[i].img, snow[i].x - snow[i].s, snow[i].y - snow[i].s); } requestAnimationFrame(render); } </script>
If you want to directly copy and paste you canDownload Here Snowfall with audio