Шаблон:КрасиваяКнопка/styles.css: различия между версиями
Материал из SpaceOnyx
Дополнительные действия
Neyran (обсуждение | вклад) Новая страница: «.красивая-кнопка { position: relative; display: flex; width: 100%; min-width: 45%; min-height: 32px; overflow: hidden; border-radius: 3px; } .красивая-кнопка-Ссылка:hover{ opacity: 0.05; } .красивая-кнопка-Картинка { position: relative; display: flex; align-items: center; padding: 4px; } .красивая-кнопка-Контент { position: relative; display: flex; flex-direction:...» |
Neyran (обсуждение | вклад) Нет описания правки |
||
| Строка 1: | Строка 1: | ||
/* Красивая кнопка — общий контейнер */ | |||
.красивая-кнопка { | .красивая-кнопка { | ||
position: relative; | |||
display: flex; | |||
align-items: stretch; | |||
width: 100%; | |||
min-height: 36px; | |||
box-sizing: border-box; | |||
overflow: hidden; | |||
border-radius: 4px; | |||
font-size: 14px; | |||
line-height: 1.3; | |||
color: #d2d4d5; | |||
transition: filter 0.15s ease; | |||
} | } | ||
.красивая-кнопка- | .красивая-кнопка a { | ||
text-decoration: none; | |||
color: inherit; | |||
} | } | ||
/* Растянутая ссылка — перекрывает всю кнопку */ | |||
.красивая-кнопка-Ссылка { | |||
position: absolute; | |||
top: 0; | |||
right: 0; | |||
bottom: 0; | |||
left: 0; | |||
z-index: 3; | |||
background-color: #ffffff; | |||
opacity: 0; | |||
transition: opacity 0.2s ease; | |||
} | |||
.красивая-кнопка-Ссылка:hover { | |||
opacity: 0.07; | |||
} | |||
/* Картинка слева */ | |||
.красивая-кнопка-Картинка { | .красивая-кнопка-Картинка { | ||
position: relative; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
flex: 0 0 auto; | |||
padding: 4px; | |||
box-sizing: border-box; | |||
min-width: 0; | |||
} | |||
.красивая-кнопка-Картинка img { | |||
display: block; | |||
max-width: 64px; | |||
max-height: 64px; | |||
width: auto; | |||
height: auto; | |||
object-fit: contain; | |||
} | } | ||
/* Текстовый блок справа */ | |||
.красивая-кнопка-Контент { | .красивая-кнопка-Контент { | ||
position: relative; | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: center; | |||
gap: 2px; | |||
flex: 1 1 auto; | |||
min-width: 0; | |||
padding: 6px 10px; | |||
box-sizing: border-box; | |||
white-space: normal; | |||
overflow-wrap: anywhere; | |||
word-break: break-word; | |||
} | } | ||
.красивая-кнопка-контент-Текст { | .красивая-кнопка-контент-Текст { | ||
font-weight: bold; | |||
line-height: 1.25; | |||
white-space: normal; | |||
overflow-wrap: anywhere; | |||
word-break: break-word; | |||
} | } | ||
.красивая-кнопка-контент-Подтекст { | .красивая-кнопка-контент-Подтекст { | ||
font-size: 12px; | |||
font-style: italic; | |||
line-height: 1.3; | |||
opacity: 0.85; | |||
white-space: normal; | |||
overflow-wrap: anywhere; | |||
word-break: break-word; | |||
} | } | ||
Текущая версия от 22:34, 12 сентября 2026
/* Красивая кнопка — общий контейнер */
.красивая-кнопка {
position: relative;
display: flex;
align-items: stretch;
width: 100%;
min-height: 36px;
box-sizing: border-box;
overflow: hidden;
border-radius: 4px;
font-size: 14px;
line-height: 1.3;
color: #d2d4d5;
transition: filter 0.15s ease;
}
.красивая-кнопка a {
text-decoration: none;
color: inherit;
}
/* Растянутая ссылка — перекрывает всю кнопку */
.красивая-кнопка-Ссылка {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 3;
background-color: #ffffff;
opacity: 0;
transition: opacity 0.2s ease;
}
.красивая-кнопка-Ссылка:hover {
opacity: 0.07;
}
/* Картинка слева */
.красивая-кнопка-Картинка {
position: relative;
display: flex;
align-items: center;
justify-content: center;
flex: 0 0 auto;
padding: 4px;
box-sizing: border-box;
min-width: 0;
}
.красивая-кнопка-Картинка img {
display: block;
max-width: 64px;
max-height: 64px;
width: auto;
height: auto;
object-fit: contain;
}
/* Текстовый блок справа */
.красивая-кнопка-Контент {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
gap: 2px;
flex: 1 1 auto;
min-width: 0;
padding: 6px 10px;
box-sizing: border-box;
white-space: normal;
overflow-wrap: anywhere;
word-break: break-word;
}
.красивая-кнопка-контент-Текст {
font-weight: bold;
line-height: 1.25;
white-space: normal;
overflow-wrap: anywhere;
word-break: break-word;
}
.красивая-кнопка-контент-Подтекст {
font-size: 12px;
font-style: italic;
line-height: 1.3;
opacity: 0.85;
white-space: normal;
overflow-wrap: anywhere;
word-break: break-word;
}