Открыть меню
Переключить меню настроек
Открыть персональное меню
Вы не представились системе
Ваш IP-адрес будет виден всем, если вы внесёте какие-либо изменения.

Шаблон:КрасиваяКнопка/styles.css: различия между версиями

Материал из SpaceOnyx
Новая страница: «.красивая-кнопка { 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:...»
 
Нет описания правки
 
Строка 1: Строка 1:
/* Красивая кнопка — общий контейнер */
.красивая-кнопка {
.красивая-кнопка {
position: relative;
    position: relative;
display: flex;
    display: flex;
width: 100%;
    align-items: stretch;
min-width: 45%;
    width: 100%;
min-height: 32px;
    min-height: 36px;
overflow: hidden;
    box-sizing: border-box;
border-radius: 3px;
    overflow: hidden;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.3;
    color: #d2d4d5;
    transition: filter 0.15s ease;
}
}


.красивая-кнопка-Ссылка:hover{
.красивая-кнопка a {
opacity: 0.05;
    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;
    position: relative;
display: flex;
    display: flex;
align-items: center;
    align-items: center;
padding: 4px;
    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;
    position: relative;
display: flex;
    display: flex;
flex-direction: column;
    flex-direction: column;
justify-content: center;
    justify-content: center;
gap: 4px;
    gap: 2px;
width: 100%;
    flex: 1 1 auto;
padding: 6px 10px;
    min-width: 0;
box-sizing: border-box;
    padding: 6px 10px;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}
}


.красивая-кнопка-контент-Текст {
.красивая-кнопка-контент-Текст {
line-height: 1;
    font-weight: bold;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}
}


.красивая-кнопка-контент-Подтекст {
.красивая-кнопка-контент-Подтекст {
font-size: 12px;
    font-size: 12px;
}
    font-style: italic;
 
    line-height: 1.3;
.красивая-кнопка-Ссылка {
    opacity: 0.85;
position: absolute;
    white-space: normal;
top: 0;
    overflow-wrap: anywhere;
bottom: 0;
    word-break: break-word;
left: 0;
right: 0;
z-index: 3;
background-color: #FFFFFF;
opacity: 0;
transition: all 0.2s ease;
}
}

Текущая версия от 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;
}