Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
polozin committed Dec 27, 2023
1 parent c0e70d7 commit 7336a61
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 21 deletions.
Binary file added assets/images/hole.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 17 additions & 10 deletions assets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,21 @@ body{
flex-grow: 3;
}
.hole{
height: 10vh;
width: 12vw;
background-color: maroon;
display: flex;
flex-direction: column-reverse;
align-self: center;
height: 100px;
width: 200px;
background-color: darkgreen;
background: url("/assets/images/hole.png") no-repeat 0 100px ;
animation-name: testmove;
animation-duration: 1s;
animation-iteration-count: 1;
animation-fill-mode: forwards;
}
@keyframes testmove {
from{
background-position: 0 100px;
}
to{
background-position: 0 0;
}

}
.hole-line{
height: 1vh;
background-color: gray;
}
12 changes: 1 addition & 11 deletions js/index.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
const holeHeight = 12;
const holeWidth = 10;
const holeLineShift = 0.2;
const startButton = document.querySelector('.btn-start');
startButton.addEventListener('click', (e) =>{
let holeObject = document.querySelector('.hole');
fillHole(holeObject);
})
function fillHole(holeObject) {
let lineWidth = holeWidth;
for (let i = holeHeight; i > 0; i--) {
const line = document.createElement('span');
line.setAttribute('class', 'hole-line');
line.setAttribute('style', `width: ${lineWidth}vw`);
lineWidth -= holeLineShift;
holeObject.appendChild(line);
}

}

function test() {
Expand Down
2 changes: 2 additions & 0 deletions remembers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
create new branch from current.
git checkout -b name-new-branch

0 comments on commit 7336a61

Please sign in to comment.