Показать сообщение отдельно
  #2 (permalink)  
Старый 04.02.2017, 22:36
Аватар для рони
Профессор
Отправить личное сообщение для рони Посмотреть профиль Найти все сообщения от рони
 
Регистрация: 27.05.2010
Сообщений: 33,068

phoenix200689,
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <!-- <link rel="stylesheet" href="style.css"> -->
</head>
<body>

<div class="fixed-wrap fixed-wrap__modal">
    	<div class="modal">
        	<div class="modal-container">
        	</div>
    	</div>
  </div>

  <button class="tasks__btn" type="submit">+ добавить задачу</button>

    <style>
      .fixed-wrap {
      display: none;
        position: fixed;
        overflow: auto;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, .6);
        opacity: 0;
        transition: opacity 1s;
    }

    .fixed-wrap._show {
      opacity: 1;
    }

    .tasks__btn {
        cursor: pointer;
    }

    </style>


<script>
document.addEventListener("DOMContentLoaded", function() {
    document.querySelector(".tasks__btn").addEventListener("click", function() {
        var popup = document.querySelector(".fixed-wrap");
        popup.style.display = "block";
        window.setTimeout(function() {
            popup.classList.add("_show")
        }, 0)
    })
});
</script>


</body>
</html>
Ответить с цитированием