@qwerty12345678910

Почему у меня не работает?

Посмотрел по этому ролику, но не работает ничего:
https://www.youtube.com/watch?v=d7F2nzjc1PI&ab_cha...

HTML
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta2/css/all.min.css" integrity="sha512-YWzhKL2whUzgiheMoBFwW8CKV4qpHQAEuvilg9FAn5VJUDwKZZxkJNuGM4XkWuk94WCrrwslk8yWNGmY1EduTA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
    
    <title>Document</title>
</head>
<body>
    <div class="wrapper">
        <h1 class="text">Введите сообщение</h1>
        <div class="main">
            <input id="message" type="text">
            <label class="message__placholder">Message</label>
        </div>
        <div class="line"></div>
        <div class="line-up"></div>
    </div>

    <script src="app.js"></script>
</body>
</html>


CSS
body {
    background: #F8F9FA;
    padding: 0;
    margin: 0;
    text-decoration: none;
}
* {
    outline: none; 
    border: none;
    font-family: "Montserrat", sans-serif;
}

.text {
    font-weight: 600;
    margin-top: 20px;
    margin-left: 28px;
    font-size: 18px;
}
.text::after {
    content: '';
    display: block;
    position: relative;
    background: #000;
    width: 80px;
    height: 3px;
    top: 8px;
}

.wrapper {
    position: absolute;
    top: 27%;
    left: 30%;
    background-color: #fff;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.06);
    width: 350px;
    height: 250px;
    border-radius: 20px;
}
.main {
    position: relative;
    top: 22%;
    left: 20%;
}
#message {
    display: block;

    color: #2094E9;
    font-weight: 500;
    padding: 15px 18px;
    border-radius: 16px;
    border: 2px solid #adadad;

    transition: .4s;
}
#message:hover {
    border: 2px solid #2094E9;
}
#message:focus {
    box-shadow: 0px 0px 1px 3px rgba(32, 148, 233, 0.20);
    border: 2px solid #2094E9;
}

input:focus ~ .message__placholder,
input:valid ~ .message__placholder {
    color: #2094E9;
    left: 16px;
    bottom: 57px;
    font-size: 12px;
    z-index: 10;
}

.message__placholder {
    display: block;
    position: relative;
    bottom: 35px;
    left: 20px;
    font-size: 12px;
    font-size: 14px;
    color: #aaaaaa;
    font-weight: 500;
    background-color: #fff;
    width: 60px;
    text-align: center;

    transition: .3s;
}
.line {
    position: absolute;
    top: 240px;
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
    background-color: #c9c9c9;
    width: 350px;
    height: 10px;
}
.line-up {
    position: absolute;
    top: 240px;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    background-color: #2094E9;
    width: 0; /*350*/
    height: 10px;
}
  • Вопрос задан
  • 93 просмотра
Решения вопроса 1
iiiBird
@iiiBird Куратор тега CSS
Пока ты спишь - твой конкурент совершенствуется
пропустил атрибут required для input
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы