palette
This commit is contained in:
parent
54b15a3003
commit
711d1e176a
11
index.js
11
index.js
@ -20,3 +20,14 @@ for(let i=0;i<20;i++) {
|
||||
rowDiv.appendChild(div);
|
||||
}
|
||||
}
|
||||
let palette = document.createElement('div');
|
||||
palette.className = 'Pal';
|
||||
document.body.appendChild(palette);
|
||||
for(let i=0;i<2;i++) {
|
||||
const color = document.createElement('div');
|
||||
color.className = 'palColor'+i;
|
||||
palette.appendChild(color);
|
||||
// div.addEventListener("click",(e)=>{
|
||||
// e.target.
|
||||
// })
|
||||
}
|
||||
|
||||
19
style.css
19
style.css
@ -21,4 +21,23 @@
|
||||
border: 1px solid green;
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.Pal{
|
||||
display: flex;
|
||||
}
|
||||
.palColor0{
|
||||
display: flex;
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
border: 1px solid black;
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.palColor1{
|
||||
display: flex;
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
border: 1px solid black;
|
||||
background-color: blue;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user