Main Page/styles.css

Revision as of 00:57, 25 October 2024 by Selfice (talk | contribs)
.mainpage-title{
	font-size:1.6em;
	font-weight: bold;
}
.text-container {
    position: relative;
    width: 100%; /* 可以根据需要调整 */
    height: auto; /* 可以根据需要调整 */
    margin: 0 auto; /* 居中对齐 */
    overflow: hidden;
}

.text-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    animation: slide-animation 6s infinite;
}

.text-slide:nth-child(1) {
    animation-delay: 0s;
}

.text-slide:nth-child(2) {
    animation-delay: 2s;
}

.text-slide:nth-child(3) {
    animation-delay: 4s;
}

@keyframes slide-animation {
    0%, 20% {
        opacity: 0;
        transform: translateX(0);
    }
    25%, 45% {
        opacity: 1;
        transform: translateX(-1px);
    }
    30%, 40% {
        transform: translateX(1px);
    }
    50%, 100% {
        opacity: 0;
        transform: translateX(0);
    }
}