A visually appealing calculator project with a user interface resembling the iPhone calculator. Built using HTML, CSS, and JavaScript, this project offers a functional and responsive design for everyday arithmetic operations.
- Modern UI: Mimics the design of the iPhone calculator.
- Responsive Design: Works seamlessly on desktops, tablets, and mobile devices.
- Functional Keys: Supports standard arithmetic operations including addition, subtraction, multiplication, and division.
- Clear Button: Reset the calculations instantly.
- Decimal Support: Allows operations with floating-point numbers.
- Keyboard Support: Perform calculations using keyboard input.
- HTML: Structure of the calculator.
- CSS: Styling for an iPhone-like design.
- JavaScript: Logic for calculations and interactivity.
📁 Calculator-Project
├── 📄 index.html # Main HTML file
├── 📄 styles.css # Stylesheet for the UI
├── 📄 script.js # JavaScript for calculator functionality
└── 📄 README.md # Project documentation
-
Clone this repository:
git clone https://github.com/your-username/calculator-project.git
-
Navigate to the project directory:
cd calculator-project -
Open the
index.htmlfile in your browser:open index.html
The main file containing the structure of the calculator.
Defines the styles for buttons, layout, and animations.
Contains the logic for all button clicks and keypress events.
document.querySelectorAll(".button").forEach(button => {
button.addEventListener("click", event => {
handleButtonClick(event.target.innerText);
});
});Contributions are welcome! If you have suggestions or find bugs, please open an issue or submit a pull request.
This project is licensed under the MIT License.
- Inspiration: Apple's iPhone calculator.
- Icons: Font Awesome.
