Delete 100_projects/JavaScript background changer directory
This commit is contained in:
parent
c3eab99900
commit
3d44796eea
@ -1,13 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Background Color</title>
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<script src="script.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<button id="btn">Change Me</button>
|
||||
</body>
|
||||
</html>
|
@ -1,8 +0,0 @@
|
||||
const btn = document.getElementById("btn");
|
||||
|
||||
btn.addEventListener("click", () => {
|
||||
document.body.style.background = randomBg();
|
||||
});
|
||||
function randomBg() {
|
||||
return `hsl(${Math.floor(Math.random() * 360)}, 100%, 50%)`;
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0;
|
||||
min-height: 100vh;
|
||||
}
|
||||
button {
|
||||
background:rgba(0, 0, 0, 0.4);
|
||||
backdrop-filter: blur(10px);
|
||||
color: white;
|
||||
padding: 1rem;
|
||||
font-size: 1.2rem;
|
||||
box-shadow:
|
||||
5px 5px 6px rgba(0, 0, 0, 0.3),
|
||||
-5px -5px 6px rgba(0, 0, 0, 0.3);
|
||||
border-radius: 5px;
|
||||
border: none;
|
||||
transition: transform 0.1s linear;
|
||||
cursor: pointer;
|
||||
}
|
||||
button:focus {
|
||||
outline: none;
|
||||
}
|
||||
button:active {
|
||||
box-shadow: 0;
|
||||
transform: translate(2px, 2px);
|
||||
}
|
Loading…
Reference in New Issue
Block a user