From f8f6d394713c04bd34a3ea37e42549c0eb7fe6c6 Mon Sep 17 00:00:00 2001 From: Shubham Thakur <84236393+shubham-31-thakur@users.noreply.github.com> Date: Sat, 28 Oct 2023 00:58:40 +0530 Subject: [PATCH] Create color_and_resizing.js --- color_and_resizing.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 color_and_resizing.js diff --git a/color_and_resizing.js b/color_and_resizing.js new file mode 100644 index 0000000..ccfe894 --- /dev/null +++ b/color_and_resizing.js @@ -0,0 +1,15 @@ +function applyEffects() { + const effectBox = document.getElementById('myEffectBox'); + + // Apply effects + effectBox.style.opacity = '1'; // Fade in + effectBox.style.backgroundColor = 'green'; // Change color + effectBox.style.transform = 'scale(1.5)'; // Resize + + // Reset effects after a delay + setTimeout(function() { + effectBox.style.opacity = '0'; // Fade out + effectBox.style.backgroundColor = 'red'; // Reset color + effectBox.style.transform = 'scale(1)'; // Reset size + }, 1000); // 1000ms (1 second) delay +}