Как сделать размытие блока в конце,как на макете?

Рейтинг: 0Ответов: 0Опубликовано: 27.08.2023

Как сделать такое рызмытие,которое в конце блока : введите сюда описание изображения

Мой код :

    <!DOCTYPE html>
<html>
  <head>
    <script defer src="indexS.js"></script>
    <style>
      body {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
        margin: 0;
      }

      .container {
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow-y: scroll;
        width: 315px;
        height: 310px;
      }

      /* Скрытие полосы прокрутки в веб-браузерах на основе WebKit */
      .container::-webkit-scrollbar {
        width: 0.5em;
      }

      .container::-webkit-scrollbar-track {
        background-color: transparent;
      }

      .container::-webkit-scrollbar-thumb {
        background-color: transparent;
      }

      .row {
        display: flex;
        justify-content: space-between;
        width: 100%;
        margin-bottom: 10px;
        margin-top: 15px;
      }

      .block {
        width: 140px;
        height: 100px;
        border-radius: 18px;
        background-color: lightgray;
        opacity: 0.5;
        transition: opacity 0.3s ease-in-out;
      }

      .block.visible {
        opacity: 1;
      }

      .block:nth-child(odd) {
        margin-right: 10px;
      }

      
    </style>
  </head>
  <body>
    <div class="container dragscroll">
      <div class="row">
        <div class="block"></div>
        <div class="block"></div>
      </div>
      <div class="row">
        <div class="block"></div>
        <div class="block"></div>
      </div>
      <div class="row">
        <div class="block"></div>
        <div class="block"></div>
      </div>
    </div>
  </body>
</html>

Ответы

Ответов пока нет.