Форум программистов
 

Восстановите пароль или Зарегистрируйтесь на форуме, о проблемах и с заказом рекламы пишите сюда - alarforum@yandex.ru, проверяйте папку спам!

Вернуться   Форум программистов > Web программирование > Общие вопросы Web
Регистрация

Восстановить пароль
Повторная активизация e-mail

Купить рекламу на форуме - 42 тыс руб за месяц

Ответ
 
Опции темы Поиск в этой теме
Старый 07.12.2021, 00:07   #1
nonameii3ii
Пользователь
 
Регистрация: 16.04.2021
Сообщений: 73
По умолчанию Как выставить карточки товаров в один ряд,по 4 шт

html:
Код:
<div class="container">
		<div class="row">
		<div class="col-md-3 col-sm-6">
		<div class="product-grid">
		<div class="product-image">
		<a href="#">
		<img class="pic-1" src="http://zornet.ru/ZORNET-RU/ZR/Alinuversa/zorner-ru/img-1.jpg">
		<img class="pic-2" src="http://zornet.ru/ZORNET-RU/ZR/Alinuversa/zorner-ru/img-2.jpg">
		</a>
		<span class="product-trend-label">Trend</span>
		<ul class="social">
		<li><a href="#" data-tip="Add to Cart"><i class="fas fa-shopping-cart"></i></a></li>
		</ul>
		</div>
		<div class="product-content">
		<h3 class="title"><a href="#">ZorNet.Ru — сайт для вебмастера</a></h3>
		<div class="price">$86.34</div>
		</div>
		</div>
		</div>
		<div class="col-md-3 col-sm-6">
		<div class="product-grid">
		<div class="product-image">
		<a href="#">
		<img class="pic-1" src="http://zornet.ru/ZORNET-RU/ZR/Alinuversa/zorner-ru/img-3.jpg">
		<img class="pic-2" src="http://zornet.ru/ZORNET-RU/ZR/Alinuversa/zorner-ru/img-4.jpg">
		</a>
		<span class="product-trend-label">Trend</span>
		<span class="product-discount-label">-20%</span>
		<ul class="social">
		<li><a href="#" data-tip="Add to Cart"><i class="fas fa-shopping-cart"></i></a></li>
		</ul>
		</div>
		<div class="product-content">
		<h3 class="title"><a href="#">Костюм шаблона</a></h3>
		<div class="price discount"><span>$45.83</span> $13.60</div>
		</div>
		</div>
		</div>
		</div>
		<div class="row">
			<div class="col-md-3 col-sm-6">
			<div class="product-grid">
			<div class="product-image">
			<a href="#">
			<img class="pic-1" src="http://zornet.ru/ZORNET-RU/ZR/Alinuversa/zorner-ru/img-1.jpg">
			<img class="pic-2" src="http://zornet.ru/ZORNET-RU/ZR/Alinuversa/zorner-ru/img-2.jpg">
			</a>
			<span class="product-trend-label">Trend</span>
			<ul class="social">
			<li><a href="#" data-tip="Add to Cart"><i class="fas fa-shopping-cart"></i></a></li>
			</ul>
			</div>
			<div class="product-content">
			<h3 class="title"><a href="#">ZorNet.Ru — сайт для вебмастера</a></h3>
			<div class="price">$86.34</div>
			</div>
			</div>
			</div>
			<div class="col-md-3 col-sm-6">
			<div class="product-grid">
			<div class="product-image">
			<a href="#">
			<img class="pic-1" src="http://zornet.ru/ZORNET-RU/ZR/Alinuversa/zorner-ru/img-3.jpg">
			<img class="pic-2" src="http://zornet.ru/ZORNET-RU/ZR/Alinuversa/zorner-ru/img-4.jpg">
			</a>
			<span class="product-trend-label">Trend</span>
			<span class="product-discount-label">-20%</span>
			<ul class="social">
			<li><a href="#" data-tip="Add to Cart"><i class="fas fa-shopping-cart"></i></a></li>
			</ul>
			</div>
			<div class="product-content">
			<h3 class="title"><a href="#">Костюм шаблона</a></h3>
			<div class="price discount"><span>$45.83</span> $13.60</div>
			</div>
			</div>
			</div>
			</div>
	  </div>
</div>
css:
Код:
.product-grid{
  font-family: 'Roboto', sans-serif;
  position: relative;
}
.product-grid .product-image{
  overflow: hidden;
  position: relative;
}
.product-grid .product-image:before{
  content: "";
  background: rgba(0,0,0,0.3);
  width: 100%;
  height: 100%;
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  transition: all 0.4s ease-out 0s;
}
.product-grid:hover .product-image:before{ opacity: 1; }
.product-grid .product-image a{ display: block; }
.product-grid .product-image img{
  width: 100%;
  height: auto;
}
.product-image .pic-1{
  opacity: 1;
  backface-visibility: hidden;
  transition: all 0.4s ease-out 0s;
}
.product-grid:hover .product-image .pic-1{ opacity: 0; }
.product-image .pic-2{
  width: 100%;
  height: 100%;
  opacity: 0;
  backface-visibility: hidden;
  transform: scale(3);
  position: absolute;
  top: 0;
  left: 0;
  transition: all 0.4s ease-out 0s;
}
.product-grid:hover .product-image .pic-2 {
  opacity: 1;
  transform: scale(1);
}
.product-image .product-trend-label,
.product-image .product-discount-label{
  content: "";
  color: #fff;
  background-color: #2ecc71;
  font-size: 12px;
  line-height: 28px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  padding: 0 7px;
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
}
.product-image .product-discount-label{
  background-color: #e74c3c;;
  left: auto;
  right: 12px;
}
.product-grid .social {
  padding: 0;
  margin: 0;
  list-style: none;
  transform: translateY(-50%);
  position: absolute;
  top: 50%;
  left: 10px;
  z-index: 4;
}
.product-grid .social li {
  margin: 0 0 12px;
  opacity: 0;
  transform: translateX(-60px);
  transition: transform .3s ease-out 0s;
}
.product-grid:hover .social li {
  opacity: 1;
  transform: translateX(0);
}
.product-grid:hover .social li:nth-child(2){ transition-delay: 0.1s; }
.product-grid:hover .social li:nth-child(3){ transition-delay: 0.2s; }
.product-grid:hover .social li:nth-child(4){ transition-delay: 0.3s; }
.product-grid .social li a {
  color: #fff;
  font-size: 22px;
  transition: all 0.3s;
}
.product-grid .social li a:hover { color: #e74c3c;; }
.product-grid .social li a:before,
  .product-grid .social li a:after{
  content: attr(data-tip);
  color: #000;
  background: #fff;
  font-size: 14px;
  padding: 5px 10px;
  white-space: nowrap;
  display: none;
  transform: translateY(-50%);
  position: absolute;
  left: 33px;
  top: 50%;
  transition: all 0.3s;
}
.product-grid .social li a:after{
  content: '';
  background: linear-gradient(-45deg, #fff 49%, transparent 50%);
  width: 10px;
  height: 10px;
  top: 40%;
  left: 20px;
}
.product-grid .social li a:hover:before,
.product-grid .social li a:hover:after{
  display: block;
}
.product-grid .product-content{ padding: 12px 0; }
.product-grid .title{
  font-size: 15px;
  font-weight: 400;
  text-transform: capitalize;
  margin: 0 0 5px;
}
.product-grid .title a{ color: #959595; }
.product-grid .title a:hover{ color: #e74c3c;; }
.product-grid .price{
  color: #333;
  font-size: 14px;
  font-weight: 400;
}
.product-grid .price span{
  color: #333;
  text-decoration: line-through;
  margin-right: 3px;
}
.product-grid .price.discount{ color: #e74c3c;; }
@media only screen and (max-width:990px){
  .product-grid{ margin-bottom: 30px; }
}
Изображения
Тип файла: jpg Снимок экрана (1029).jpg (49.4 Кб, 0 просмотров)
nonameii3ii вне форума Ответить с цитированием
Ответ


Купить рекламу на форуме - 42 тыс руб за месяц

Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск


Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
как сделать, чтоб при нажатии на один из товаров в интернет магазине попадал на новую страницу этого товара Vsofts PHP 3 13.07.2016 07:04
Как выставить 2 картинки в ряд? nazar-com HTML и CSS 3 12.12.2013 08:44
Вольтаж DDR3 (как выставить?) cynep Компьютерное железо 6 18.11.2013 10:00
Как создать карточки. Керимов Помощь студентам 0 11.11.2011 21:46
Перемещение и замена данных на один ряд выше Khabibula Microsoft Office Access 1 13.08.2008 12:57