پرش به محتوا

الگو:پاسخ تاشو/styles.css: تفاوت میان نسخه‌ها

از ویکی پاسخ
بدون خلاصۀ ویرایش
بدون خلاصۀ ویرایش
خط ۲: خط ۲:
             transition: all 0.3s ease;
             transition: all 0.3s ease;
             user-select: none;
             user-select: none;
cursor: pointer;
         }
         }


خط ۱۴: خط ۱۵:
top: 50%;
top: 50%;
           transition: transform 0.3s ease;
           transition: transform 0.3s ease;
    transform: translateY(-50%);
             color: #94f7a1;
             color: #94f7a1;
             font-size: 12px;
             font-size: 12px;
خط ۱۹: خط ۲۱:


         .question.active::after {
         .question.active::after {
            transform: rotate(180deg);
    transform: translateY(-50%) rotate(180deg);
         }
         }



نسخهٔ ‏۷ فوریهٔ ۲۰۲۶، ساعت ۱۳:۱۶

        .question {
            transition: all 0.3s ease;
            user-select: none;
cursor: pointer;
        }

        .question:hover {
            background: #eaffec;
        }

        .question::after {
            content: '▼';
            position: relative;
            right: 95px;
top: 50%;
           transition: transform 0.3s ease;
    transform: translateY(-50%);
            color: #94f7a1;
            font-size: 12px;
        }

        .question.active::after {
    transform: translateY(-50%) 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;
        }