generated from MariiaSam/goit-markup-hw-07
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
268 additions
and
4 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
.box { | ||
width: 100px; | ||
height: 100px; | ||
} | ||
|
||
.container { | ||
display: flex; | ||
justify-content: space-around; | ||
} | ||
|
||
.item-black { | ||
width: 50px; | ||
height: 50px; | ||
background-color: black; | ||
padding: 10px; | ||
border: 2px solid black; | ||
} | ||
|
||
.item-green { | ||
width: 70px; | ||
height: 70px; | ||
background-color: green; | ||
padding: 10px; | ||
border: 2px solid black; | ||
} | ||
|
||
.item-red { | ||
background-color: red; | ||
padding: 10px; | ||
border: 2px solid black; | ||
} | ||
|
||
|
||
/* | ||
ul { | ||
display: flex; | ||
justify-content: space-around; | ||
flex-wrap: wrap; | ||
gap: 20px; | ||
user-select: none; | ||
list-style: none; | ||
} | ||
.item { | ||
width: 300px; | ||
border: 1px solid black; | ||
} | ||
.modal{ | ||
background-color: white; | ||
} | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Document</title> | ||
<link rel="stylesheet" href="./evt.css"> | ||
</head> | ||
<body> | ||
<div class="container js-box"> | ||
<button type="button" class="js-button js-box-1 item-red" data-color="red" > Red</button> | ||
<button type="button" class="js-button js-box-2 item-blue" data-color="blue" >Blue</button> | ||
<button type="button" class="js-button js-box-3 item-green" data-color="green">Green</button> | ||
|
||
</div> | ||
<script src="./evt.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const box = document.querySelector('.js-box'); | ||
console.log(box); | ||
const jsButton = document.querySelectorAll('.js-button') | ||
|
||
box.addEventListener('click', handlerBox); | ||
|
||
function handlerBox(evt) { | ||
if (evt.currentTarget === evt.target){ | ||
return; | ||
} | ||
|
||
if (!evt.target.classList.contains('.js-button')){ | ||
return; | ||
} | ||
console.log(evt.target); | ||
} | ||
|
||
// jsButton.addEventListener('click', handlerButton); | ||
|
||
// function handlerButton(evt) { | ||
|
||
// console.log(evt.target); | ||
|
||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.box { | ||
width: 100px; | ||
height: 100px; | ||
} | ||
|
||
.container { | ||
display: flex; | ||
justify-content: space-around; | ||
} | ||
|
||
.item-black { | ||
width: 50px; | ||
height: 50px; | ||
background-color: black; | ||
} | ||
|
||
.item-green { | ||
width: 70px; | ||
height: 70px; | ||
background-color: green; | ||
} | ||
|
||
.item-red { | ||
background-color: red; | ||
} | ||
|
||
ul { | ||
display: flex; | ||
justify-content: space-around; | ||
flex-wrap: wrap; | ||
gap: 20px; | ||
user-select: none; | ||
list-style: none; | ||
} | ||
|
||
.item { | ||
width: 300px; | ||
border: 1px solid black; | ||
} | ||
|
||
|
||
.modal{ | ||
background-color: white; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Document</title> | ||
<link rel="stylesheet" href="target.css"> | ||
</head> | ||
<body> | ||
|
||
<d class="container js-container"> | ||
<div class="box js-box js-box-1 item-red" data-color="red"></div> | ||
<div class="box js-box js-box-3 item-black" data-color="black"></div> | ||
<div class="box js-box js-box-2 item-green" data-color="green"></div> | ||
</d iv> | ||
<ul class="js-products"></ul> | ||
<h1 class="js-title"></h1> | ||
<div id="controls"> | ||
<input type="number" min="1" max="100" step="1" class="js-input" /> | ||
<button type="button" class="js-create">Create</button> | ||
<button type="button" class="js-destroy">Destroy</button> | ||
</div> | ||
|
||
<div id="boxes"></div> | ||
<script src="js/practice.js"></script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters