ADD стиль только на маленьких экранах

This commit is contained in:
Krivchikov Dmitry 2015-12-07 00:56:41 +03:00
parent ab0e1d4c6c
commit 2afd42304c
2 changed files with 7 additions and 1 deletions

View File

@ -15,6 +15,8 @@ div#control {position: fixed; z-index: 1000;}
/* ------------- ADAPTIVE --------------------*/ /* ------------- ADAPTIVE --------------------*/
/* -------------------------------------------*/ /* -------------------------------------------*/
.onlySmallScreen {display: none;}
/* Target landscape smartphones, portrait tablets, narrow desktops */ /* Target landscape smartphones, portrait tablets, narrow desktops */
@media screen and (max-width:1200px) { @media screen and (max-width:1200px) {
.pagePoinsNearCards {display: inline-block; width: 153px; height: 114px; overflow: hidden;} .pagePoinsNearCards {display: inline-block; width: 153px; height: 114px; overflow: hidden;}
@ -26,9 +28,10 @@ div#control {position: fixed; z-index: 1000;}
#pageSmoothBackground {display: none;} #pageSmoothBackground {display: none;}
} }
@media screen and (max-width:990px) { @media screen and (max-width:992px) {
.pagePoinsNearCards {display: inline-block; width: 116px; height: 87px; overflow: hidden;} .pagePoinsNearCards {display: inline-block; width: 116px; height: 87px; overflow: hidden;}
.pagePoinsNearCardsImg {width: 116px; height: 87px;} .pagePoinsNearCardsImg {width: 116px; height: 87px;}
.onlySmallScreen {display: initial;}
} }
@media screen and (max-width:815px) { @media screen and (max-width:815px) {

View File

@ -2,6 +2,7 @@
<div class="container"> <div class="container">
<div class="row elements"> <div class="row elements">
<div class="col-md-2"> <div class="col-md-2">
<h4 class="onlySmallScreen">Новости</h4>
<?php foreach ($news as $item) : ?> <?php foreach ($news as $item) : ?>
<div class="element news"> <div class="element news">
<h4><?= $item->title ?></h4> <h4><?= $item->title ?></h4>
@ -10,6 +11,7 @@
<?php endforeach;?> <?php endforeach;?>
</div> </div>
<div class="col-md-5"> <div class="col-md-5">
<h4 class="onlySmallScreen">Точки</h4>
<?php foreach ($points as $item) : ?> <?php foreach ($points as $item) : ?>
<div class="element points"> <div class="element points">
<h4><?= $item->name ?></h4> <h4><?= $item->name ?></h4>
@ -24,6 +26,7 @@
<a href="/page/points/"><h4 style="text-align: center;">У нас есть больше новых точек!</h4></a> <a href="/page/points/"><h4 style="text-align: center;">У нас есть больше новых точек!</h4></a>
</div> </div>
<div class="col-md-5"> <div class="col-md-5">
<h4 class="onlySmallScreen">Статьи</h4>
<?php foreach ($articles as $item) : ?> <?php foreach ($articles as $item) : ?>
<div class="element articles"> <div class="element articles">
<h4><?= $item->title ?></h4> <h4><?= $item->title ?></h4>