From 304f18973583326e8a9a701e1846b6de81419abd Mon Sep 17 00:00:00 2001 From: Ashwini Gurbaxani <98401812+gurbaxani@users.noreply.github.com> Date: Sun, 15 Sep 2024 14:09:54 +0530 Subject: [PATCH] Align text better, clip sound --- script.js | 2 +- styles.css | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/script.js b/script.js index eed3a92..c8dae07 100644 --- a/script.js +++ b/script.js @@ -84,7 +84,7 @@ document.addEventListener('DOMContentLoaded', function () { const bellSound = new Audio('sounds/bell.mp3'); // Update the path as needed resultDiv.addEventListener('click', function() { - bellSound.currentTime = 0.5; // Restart the audio from the beginning + bellSound.currentTime = 0.25; // Restart the audio from the beginning bellSound.play(); // Play the sound effect }); diff --git a/styles.css b/styles.css index f2bce48..1c307c2 100644 --- a/styles.css +++ b/styles.css @@ -5,10 +5,6 @@ } .timer-container { - /* position: fixed; */ - /* bottom: 20px; */ - /* left: 50%; - transform: translateX(-50%); */ display: flex; align-items: center; } @@ -21,17 +17,22 @@ .nav-button { margin: 5px; - transition: background-color 0.3s ease; /* Smooth transition for hover effect */ + transition: background-color 0.3s ease; } .timer-container .nav-button { width: 100px; height: 40px; - transition: background-color 0.3s ease; /* Smooth transition for hover effect */ + cursor: pointer; + transition: background-color 0.3s ease; } #result { - cursor: pointer; /* Change cursor to indicate it's clickable */ + cursor: pointer; height: 10em; + user-select: none; + display: flex; + justify-content: center; + align-items: center; }