MediaWiki:Common.css: различия между версиями
Нет описания правки |
Попытка кликабельных картинок Метка: отменено |
||
| Строка 1014: | Строка 1014: | ||
.main-layout-element { | .main-layout-element { | ||
margin-bottom: 1rem; | margin-bottom: 1rem; | ||
} | |||
/* Раскрытие картинок во всплывающем окне по клику на них (для удобства назову — FancyBoxAlternative) */ | |||
/* Стили для модального окна FancyBoxAlternative */ | |||
.image-modal { | |||
display: none; | |||
position: fixed; | |||
z-index: 1000; | |||
left: 0; | |||
top: 0; | |||
width: 100%; | |||
height: 100%; | |||
background-color: rgba(0,0,0,0.9); | |||
animation: fadeIn 0.3s; | |||
} | |||
@keyframes fadeIn { | |||
from { opacity: 0; } | |||
to { opacity: 1; } | |||
} | |||
.modal-content { | |||
position: absolute; | |||
top: 50%; | |||
left: 50%; | |||
transform: translate(-50%, -50%); | |||
max-width: 90%; | |||
max-height: 90%; | |||
object-fit: contain; | |||
} | |||
.modal-close { | |||
position: absolute; | |||
top: 20px; | |||
right: 35px; | |||
color: #fff; | |||
font-size: 40px; | |||
font-weight: bold; | |||
cursor: pointer; | |||
transition: 0.3s; | |||
} | |||
.modal-close:hover { | |||
color: #bbb; | |||
} | |||
.modal-caption { | |||
position: absolute; | |||
bottom: 20px; | |||
left: 0; | |||
width: 100%; | |||
text-align: center; | |||
color: #fff; | |||
padding: 10px; | |||
background: rgba(0,0,0,0.7); | |||
} | |||
/* Делаем все изображения в контенте кликабельными (FancyBoxAlternative) */ | |||
#content img, | |||
.mw-imagepage-content img, | |||
.thumb img { | |||
cursor: pointer; | |||
transition: transform 0.2s; | |||
} | |||
#content img:hover, | |||
.mw-imagepage-content img:hover, | |||
.thumb img:hover { | |||
transform: scale(1.02); | |||
} | } | ||