This commit is contained in:
Rup Chitrak 2018-06-11 16:18:46 +05:30
parent 54b15a3003
commit 711d1e176a
2 changed files with 30 additions and 0 deletions

View File

@ -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.
// })
}

View File

@ -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;
}