Question
Please you help me write a fruit application like color application sample: index.html: body { margin: 0; padding: 0; font-family: Arial, sans-serif; } h1, h2
Please you help me write a fruit application like color application sample:
index.html:
body { margin: 0; padding: 0; font-family: Arial, sans-serif; }
h1, h2 { text-align: center; margin-top: 0; }
p { margin: 0; }
a { text-decoration: none; display: inline-block; width: 100px; height: 100px; margin: 5px; background-size: cover; }
.image { text-align: center; }
/* Styling for the fruit links */ a[href="#apple"] { background-image: url("images/apple-thumbnail.jpg"); }
a[href="#banana"] { background-image: url("images/banana-thumbnail.jpg"); }
a[href="#orange"] { background-image: url("images/orange-thumbnail.jpg"); }
a[href="#grape"] { background-image: url("images/grape-thumbnail.jpg"); }
a[href="#watermelon"] { background-image: url("images/watermelon-thumbnail.jpg"); }
a[href="#kiwi"] { background-image: url("images/kiwi-thumbnail.jpg"); }
a[href="#mango"] { background-image: url("images/mango-thumbnail.jpg"); }
a[href="#pear"] { background-image: url("images/pear-thumbnail.jpg"); }
color.js: function get(id) { return document.getElementById(id); } var darkMode = false; window.onload = function(e) { setup(); gotoPage(); } window.onhashchange = gotoPage; function setup() { var links = get('home').getElementsByTagName('a'); for (var i=0; i |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started