Оригинальное отображение информации в виде карточек

Разработка Оригинальное отображение информации в виде карточек

Нет прав для скачивания
Оригинальное отображение информации в виде карточек.
Пишем код HTML:
HTML:
<div class="company">WEB</div>
<div class="container">
  <div class="item">
    <div class="hi"><span>?</span></div>
  </div>
  <div class="item">
    <div class="hi"><span>?</span></div>
  </div>
  <div class="item">
    <div class="hi"><span>?</span></div>
  </div>
  <div class="item">
    <div class="hi"><span>?</span></div>
  </div>
  <div class="item">
    <div class="hi"><span>?</span></div>
  </div>
  <div class="item">
    <div class="hi"><span>❤️</span></div>
  </div>
  <div class="item">
    <div class="hi"><span>?</span></div>
  </div>
</div>
<div class="company">ZONES</div>
Пишем стиль:
CSS:
@import url('https://fonts.googleapis.com/css?family=Bangers');
a, a:visited {
  text-decoration: none;
  color: black;
}
body {
  height: 100vh;
  background: rgb(255,255,0);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Bangers', serif;
}
.container {
  min-height: 400px;
  min-width: 400px;
  padding: 10px;
  border-radius: 5px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  grid-gap: 10px;
}
 
.item {
  background: black;
  border-radius: 5px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transform: rotate(-45deg);
  border: 3px solid black;
  box-shadow: -5px 5px 10px rgba(0,0,0,.5);
  transition: all .3s;
}
.item:hover {
  transform: scale(1.5);
  position: relative;
  z-index: 10;
}
.item:hover::before {
  opacity: 1;
}
.item:hover .hi {
  transform: translate(-50%, -50%) rotate(45deg);
}

.item::before {
  content: '';
  height: 100%;
  width: 100%;
  position: absolute;
  background: rgba(0,0,0,.6);
  opacity: 0;
  transition: all .4s;
 
}
.item:nth-child(1) {
  background: url("https://images.unsplash.com/photo-1492633171473-373002e678b9?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1533&q=80");
  background-size: cover;
  background-position: center;
  grid-row: 1 / 3;
/*   transform: rotate(45deg); */
 
}
.item:nth-child(2) {
  background: url("https://images.unsplash.com/photo-1518656306295-aa28b28b2504?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=3750&q=80");
  background-size: cover;
  background-position: center;
/*   transform: rotate(45deg); */
 
}
.item:nth-child(3) {
  background: url("https://images.unsplash.com/photo-1469617833234-8a6843da14d0?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=3136&q=80");
  background-size: cover;
  background-position: center;
/*   grid-row: 1 / 3; */
}
.item:nth-child(4) {
  background: url("https://images.unsplash.com/photo-1515955656352-a1fa3ffcd111?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=3750&q=80");
  background-size: cover;
  background-position: center;
  postion: relative;
  z-index: 6;
}
.item:nth-child(5) {
  background: url("https://images.unsplash.com/photo-1491553895911-0055eca6402d?ixlib=rb-1.2.1&auto=format&fit=crop&w=2300&q=80");
  background-size: cover;
  background-position: center;
}
.item:nth-child(6) {
  background: url("https://images.unsplash.com/photo-1511556532299-8f662fc26c06?ixlib=rb-1.2.1&auto=format&fit=crop&w=3750&q=80");
  background-size: cover;
  background-position: center;
}
.item:nth-child(7) {
  background: url("https://images.unsplash.com/photo-1516478177764-9fe5bd7e9717?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=3450&q=80");
  background-size: cover;
  background-position: center;
/*   transform: rotate(45deg); */
  grid-column: 2 / 4;
 
}

.hi {
  position: absolute;
  height: 50px;
  width: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(#f7ff00,#ffffff);
  top: 50%;
  left: 50%;
  transform: translate(-60%, -250px) rotate(45deg);
  border-radius: 10px;
  transition: all .5s;
}

 .hi span {
  transform: rotate(-45deg);
  font-size: 22px;
}

.company {
  font-size: 150px;
  margin: 80px;
  text-shadow: -3px 3px 5px rgba(0,0,0,.5);
}

#jin {
  position: absolute;
  font-size: 18px;
  bottom: 5px;
  left: 10px;
}
 
#jin:hover > a {
  color: royalblue;
  transform: scale(1.5);
}
a {
    display: inline-block;
    transition: all .3s;
    transform-origin: bottom left;
  }

@media only screen and (max-width: 1100px) {
    .container {
      transform: scale(.7);
    }
    .company {
      margin: 0;
      font-size: 50px;
    }
}
Смотрим полученный результат:
1q86.gif
Автор
baltun
Скачиваний
0
Просмотры
877
Первый выпуск
Обновление
Рейтинг
0.00 звёзд Оценок: 0

Ещё ресурсы от baltun

Похожие ресурсы
Назад
Верх Низ