Skip to main content

Posts

Showing posts with the label html

Cara Buat Text Bercahaya dan Berkerlap Kerlip di HTML

Cara Buat Text Bercahaya dan Berkerlap Kerlip di HTML - Selamat malam agan-agan, kali ini saya akan share sesuatu yang berhubungan dengan  HTML  dan  CSS .  Di sini agan-agan pasti sudah mengenal  HTML  dan  CSS . Malam ini, yang akan saya share adalah, Anda dapat membuat teks berkedip di HTML menggunakan JavaScript dan CSS. Berikut adalah contoh kode yang dapat Anda gunakan: HTML: bash Copy code <p id = "blink" >Teks yang akan berkedip</p> CSS: css Copy code .blink { animation : blinker 0.6s linear infinite; } @keyframes blinker { 50% { opacity : 0 ; } } JavaScript: javascript Copy code const blink = document . getElementById ( 'blink' ); setInterval ( function ( ) { blink. classList . toggle ( 'blink' ); }, 600 ); Penjelasan: Pertama-tama, kita memberikan id "blink" pada elemen HTML yang akan kita buat berkedip. Kemudian, kita mendefinisikan animasi CSS dengan

How to Create Hovering Ads HTML, CSS, JavaScript on Website or Blog

How to Create Hovering Ads HTML, CSS, JavaScript on Website or Blog How to Create Hovering Ads HTML, CSS, JavaScript on a Website or Blog To make ads float on websites, you can use the JavaScript and CSS programming languages. The following is sample code to create a floating ad: HTML: javascriptCopy code <div class="ads"> <img src="path/to/your/advertisement/image.jpg" alt="Advertisement"> </div> CSS: cssCopy code .ads { position: fixed; bottom: 10px; right: 10px; z-index: 9999; animation: slideup 5s easy-in-out infinite; } @keyframes slideup { 0% { transform: translateY(0); } 50% { transform: translate Y(-20px); } 100% { transform: translate Y(0); } } JavaScript: javascriptCopy code // Set the duration of the animation in seconds var duration = 5; // Set the delay before the animation starts in seconds var delay = 2; // Wait for the specified delay before showing the ad setTimeout(function() { document. querySe