Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

finished homework #1418

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,63 @@
import './less/index.less'

// Your code goes here!
let nav = document.getElementsByClassName("nav-link");
nav.addEventListener("mouseover", evt => {
document.getElementsByClassName("nav-link").style.fontSize = "x-large";
document.write(header.fontcolor( "red" ));
});

let header = document.getElementsByClassName("intro");
header.addEventListener("click", evt => {
document.write(header.fontcolor( "blue" ));
});

let mid = document.getElementsByClassName("content-section");
mid.addEventListener("dblclick", evt => {
document.write(mid.fontcolor( "red" ));

let bottom = document.getElementsByClassName("content-section inverse-content");
bottom.addEventListener("scroll", evt => {
document.write(bottom.fontcolor( "green" ));
});


let bttn = document.getElementsByClassName("btn");
bttn.addEventListener("click", evt => {
bttn.style.fontSize = "x-large";
});

let titletxt = document.getElementsByTagName("title");
titletxt.addEventListener("mouseover", evt => {
titletxt.style.fontSize = "x-large";
});

let roundimg = document.getElementsByClassName("img-fluid rounded");
roundimg.addEventListener("mouseover", evt => {
if(roundimg && roundimg.style) {
roundimg.style.height = '10vh';
roundimg.style.width = '100px';
}
});

let contentimg = document.getElementsByClassName("img-content");
contentimg.addEventListener("load", evt => {
if(contentimg && contentimg.style) {
contentimg.style.height = '15vh';
contnentimg.style.width = '150px';
}
});

let header = document.getElementsByClassName("intro");
header.addEventListener("click", evt => {
header.style.fontSize = "x-large";
});

let foot = document.getElementsByClassName("footer");
foot.addEventListener("dblclick", evt => {
foot.style.fontSize = "large";
});

document.querySelectorAll("nav-link").addEventListener("click", function(event) {
event.preventDefault();
});