الگو:پاسخ تاشو/styles.css: تفاوت میان نسخهها
ظاهر
Nazarzadeh (بحث | مشارکتها) بدون خلاصۀ ویرایش |
Nazarzadeh (بحث | مشارکتها) بدون خلاصۀ ویرایش |
||
| خط ۲۲: | خط ۲۲: | ||
} | } | ||
.answer { | .answer p { | ||
transition: max-height 0.4s ease, padding 0.4s ease; | transition: max-height 0.4s ease, padding 0.4s ease; | ||
max-height: 2em; | max-height: 2em; | ||
| خط ۳۱: | خط ۳۱: | ||
} | } | ||
.answer.expanded { | .answer.expanded p { | ||
max-height: unset; | max-height: unset; | ||
white-space: normal; | white-space: normal; | ||
} | } | ||
نسخهٔ ۷ فوریهٔ ۲۰۲۶، ساعت ۱۲:۲۶
.question {
transition: all 0.3s ease;
user-select: none;
}
.question:hover {
background: #eaffec;
}
.question::after {
content: '▼';
position: absolute;
left: 15px;
top: 50px;
transition: transform 0.3s ease;
color: #94f7a1;
font-size: 12px;
}
.question.active::after {
transform: rotate(180deg);
}
.answer p {
transition: max-height 0.4s ease, padding 0.4s ease;
max-height: 2em;
overflow: hidden;
cursor: pointer;
white-space: nowrap;
text-overflow: ellipsis;
}
.answer.expanded p {
max-height: unset;
white-space: normal;
}