location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ { #для всей статики
expires 1M; # кэшируем на месяц
}
@media screen and (orientation: portrait) {
показываем блок с просьбой
}
var screenOrientation = orientationscreen.orientation || screen.mozOrientation || screen.msOrientation;
if (screenOrientation === "portrait-primary" || Math.abs(window.orientation) !== 90) {
показываем блок
}
if (window.innerWidth > window.innerHeight ) {
показываем блок
}
<li class="block">
<div class="desc"></div>
<img src="img/img-1.jpg" alt="Image 1">
</li>
.block {
position: relative;
}
.desc {
position: absolute;
display: none;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
.block:hover .desc {
display: block;
}