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 +}