diff --git a/dice/README.md b/dice/README.md new file mode 100644 index 0000000..e69de29 diff --git a/dice/design.css b/dice/design.css new file mode 100644 index 0000000..ba468ff --- /dev/null +++ b/dice/design.css @@ -0,0 +1,51 @@ +body{ + background-color: yellow; +} + + +div{ + + width: 100px; + height: 100px; + border: 3px solid black; + margin: 100px auto; + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-between; + align-content: center; + +} + +.rotate{ + animation-name: rotate; + animation-duration: 1s; + animation-timing-function: ease-in; + animation-iteration-count: 1; + +} + +@keyframes rotate { + 0%{ + transform: rotate(120deg); + } + + 20%{ + transform: rotateX(120deg); + } + +} + +button{ + margin-left: 48%; + +} + +.dot{ + width: 5px; + height: 5px; + border-radius: 50%; + background-color: black; + margin: 0; + +} diff --git a/dice/dice.html b/dice/dice.html new file mode 100644 index 0000000..3ca83f2 --- /dev/null +++ b/dice/dice.html @@ -0,0 +1,16 @@ + + + + + + Dic + + + + + +
+ + + + \ No newline at end of file diff --git a/dice/dice.js b/dice/dice.js new file mode 100644 index 0000000..7baa2a2 --- /dev/null +++ b/dice/dice.js @@ -0,0 +1,45 @@ +let button =document.querySelector("button") + +let div=document.querySelector("div"); +let c=0; +button.addEventListener('click',()=>{ + c++; + if(c==2) + { + let alldot=Array.from(document.getElementsByClassName("dot")) + + for(let i=0;i { + div.classList.remove("rotate") + +}, 1000); +let i=1; +while(i<=m){ + + let dot=document.createElement("div"); + dot.setAttribute("class","d") + + dot.classList.add("dot") + div.appendChild(dot); + console.log("d"+i); + + i++; +} + + + + +console.log(c); + + + +}) \ No newline at end of file