8,957
edits
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
display: flex; | display: flex; | ||
flex-wrap: wrap; | flex-wrap: wrap; | ||
gap: 10px; | gap: 10px; | ||
justify-content: flex-start; | justify-content: flex-start; | ||
} | } | ||
.mw-parser-output .media_box { | .mw-parser-output .media_box { | ||
width: 40px; | width: 40px; | ||
height: 40px; | height: 40px; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
border: 2px solid #D02019; | border: 2px solid #D02019; | ||
border-radius: 5px; | border-radius: 5px; | ||
overflow: hidden; | overflow: hidden; | ||
transition: transform 0.3s ease, filter 0.3s ease; | transition: transform 0.3s ease, filter 0.3s ease; | ||
display: flex; | background-color: #f0f0f0; | ||
padding: 5px; | |||
display: flex; /* Добавлено для центрирования */ | |||
align-items: center; | align-items: center; | ||
justify-content: center; | justify-content: center; | ||
} | } | ||
.mw-parser-output .media_box:hover { | .mw-parser-output .media_box:hover { | ||
transform: scale(1.1); | transform: scale(1.1); | ||
} | } | ||
.mw-parser-output .media_box:active { | .mw-parser-output .media_box:active { | ||
filter: brightness(0.8); | filter: brightness(0.8); | ||
} | |||
/* Стили для ссылки */ | |||
.mw-parser-output .media_box-link { | |||
width: 100%; | |||
height: 100%; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
text-decoration: none; | |||
} | |||
/* Убираем стандартные стили изображения MediaWiki */ | |||
.mw-parser-output .media_box img { | |||
max-width: 100%; | |||
max-height: 100%; | |||
width: auto; | |||
height: auto; | |||
object-fit: contain; /* Сохраняет пропорции изображения */ | |||
border: none; | |||
margin: 0; | |||
padding: 0; | |||
} | } | ||