Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions README.md

This file was deleted.

14 changes: 14 additions & 0 deletions progress-bar/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Progress-bar</title>
<link rel="stylesheet" href="/progress-bar/styles.css" />
</head>
<body>
<div class="progress-bar">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Стоило добавить какой-то контейнер, которому задать отступы, чтобы на адаптиве контент не прилипал к краям https://imgur.com/080HzFT
P.S. Да и в целом центрирование лучше делать не с помощью накладывания стилей на body, а создавать для этого специальный контейнер-обертку.
Ну и именование по бему для progress стоило сделать как Э - элемент, т.е. progress-bar__progress

<div class="progress"></div>
</div>
</body>
</html>
32 changes: 32 additions & 0 deletions progress-bar/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #000;
}

.progress-bar {
width: 350px;
height: 40px;
padding: 10px;
background-color: #000;
border: 2px solid #fff;
box-shadow: 0 0 10px #fff;
overflow: hidden;
transition: box-shadow 0.3s;
cursor: pointer;
}

.progress {
width: 0;
height: 100%;
background: linear-gradient(to bottom, #ffd700, #f19f05);
box-shadow: 0 0 10px #ff0;
transition: width 1s ease;
}

.progress-bar:hover .progress {
width: 100%;
}