Main Page/styles.css: Difference between revisions

From Center of NeuroWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 55: Line 55:
     width: 100%;
     width: 100%;
     height: auto;
     height: auto;
     padding: 10px 0;
     padding: 20px 0;
     background-color: rgba(255, 255, 255, 0.8);
     background-color: rgba(255, 255, 255, 0.8);
     display: flex;
     display: flex;
Line 66: Line 66:
     flex: 1 1 100%;
     flex: 1 1 100%;
     box-sizing: border-box;
     box-sizing: border-box;
    padding: 10px;
}
}



Revision as of 08:53, 25 October 2024

.mainpage-title{
	font-size:1.6em;
	font-weight: bold;
}
.text-container {
    position: relative;
    width: 100%; /* 可以根据需要调整 */
    height: 64px; /* 可以根据需要调整 */
    margin: 0 auto; /* 居中对齐 */
    overflow: hidden;
    text-align: center; 
}

.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);
    }
}
/*什么*/
.textbox {
    width: 100%;
    height: auto;
    padding: 20px 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-wrap: wrap;
}

.left-child,
.right-child {
    background-color: rgba(230, 230, 230, 0.8);
    flex: 1 1 100%;
    box-sizing: border-box;
    padding: 10px;
}

@media (min-width: 980px) {
    .left-child,
    .right-child {
        flex: 1;
    }

    .left-child {
        border-right: 1px solid black;
    }
}