Main Page/styles.css: Difference between revisions

From Center of NeuroWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(36 intermediate revisions by the same user not shown)
Line 2: Line 2:
font-size:1.6em;
font-size:1.6em;
font-weight: bold;
font-weight: bold;
text-shadow: rgba(150, 150, 150, 0.6) 2px 1px 2px;
}
}
.scrolling-text {
.text-container {
        overflow: hidden; /* 隐藏溢出的内容 */
    position: relative;
        height: 50px; /* 设置固定高度以限制滚动区域 */
    width: 100%; /* 可以根据需要调整 */
        border: 1px solid #000; /* 为清晰起见添加边框 */
    height: 64px; /* 可以根据需要调整 */
         position: relative; /* 设置相对定位 */
    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 {
margin: 0 auto;
    max-width: 1320px;
    height: auto;
    padding: 20px 0;
    background-color: rgba(255, 255, 255, 0.25);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    box-shadow: 5px 5px 2px rgba(150, 150, 150, 0.6);
}
.left-child, .right-child {
    background-color: rgba(240, 240, 240, 0.25);
    flex: 1 1 100%;
    box-sizing: border-box;
    padding: 10px;
}
@media (min-width: 980px) {
    .left-child,
    .right-child {
        flex: 1;
    }
    .right-child {
max-width:900px;
     }
     }
    .left-child {
        border-left: 1px solid black;
        max-width:390px;
    }
}


.scrolling-text span {
 
display: inline-block;
.container {
position: absolute; /* 绝对定位以实现移动效果 */
    width: 100%;
top: -100%; /* 从容器顶部开始 */
animation: scroll-text 5s linear infinite; /* 定义动画 */
}
}
 
.container p{
@keyframes scroll-text {
    display: flex;
0% {
    flex-wrap: wrap;
top: -100%; /* 从容器顶部开始 */
    width: 100%;
}
    justify-content: center;
100% {
}
top: 100%; /* 向下滚动到容器底部 */
.container p * a{
}
max-width:270px;
min-width:190px;
    flex: 1 1 calc(33.333% - 10px); /* 3 items per row with space for borders */
    height: 64px;
    font-weight: bold;
    font-size:20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    margin: 5px; /* Space between items */
    text-decoration: none;
    transition: all 0.2s ease-in;
    box-shadow: 5px 5px 2px rgba(150, 150, 150, 0.6);
    border-width:5px;
    border-style: solid;
}
.container p * a:hover{
height: 72px;
box-shadow: 7px 7px 6px rgba(150, 150, 150, 0.6);
border-width:12px;
}
.container p * a.external{
background-image:none;
}
.container p .en a{
background-color: #012169; /* 80% transparent blue */
    border-color: #c8102e; /* 5px 80% transparent red */
    color: white;
}
.container p .en a.external:visited{
color: white;
}
.container p .zh a{
background-color: #ee1c25; /* 80% transparent blue */
    border-color: #ee1c25; /* 5px 80% transparent red */
    color: #ffff00;
}
.container p .zh a.external:visited{
color: #ffff00;
}
.container p .ja a{
background-color: white; /* 80% transparent blue */
    border-color: white; /* 5px 80% transparent red */
    color: #bd0029;
}
.container p .ja a.external:visited{
color: #bd0029;
}
.container p .ko a{
background-color: white; /* 80% transparent blue */
    border-color: #000000; /* 5px 80% transparent red */
    color: #CD2E3A;
}
.container p .ko a span{
    color: #0047A0;
}
.container p .ko a.external:visited{
color: #CD2E3A;
}
}

Latest revision as of 19:13, 29 November 2024

.mainpage-title{
	font-size:1.6em;
	font-weight: bold;
	text-shadow: rgba(150, 150, 150, 0.6) 2px 1px 2px;
}
.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 {
	margin: 0 auto;
    max-width: 1320px;
    height: auto;
    padding: 20px 0;
    background-color: rgba(255, 255, 255, 0.25);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    box-shadow: 5px 5px 2px rgba(150, 150, 150, 0.6);
}
.left-child, .right-child {
    background-color: rgba(240, 240, 240, 0.25);
    flex: 1 1 100%;
    box-sizing: border-box;
    padding: 10px;
}
@media (min-width: 980px) {
    .left-child,
    .right-child {
        flex: 1;
    }
    .right-child {
		max-width:900px;
    }
    .left-child {
        border-left: 1px solid black;
        max-width:390px;
    }
}


.container {
    width: 100%;
}
.container p{
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
}
.container p * a{
	max-width:270px;
	min-width:190px;
    flex: 1 1 calc(33.333% - 10px); /* 3 items per row with space for borders */
    height: 64px;
    font-weight: bold;
    font-size:20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    margin: 5px; /* Space between items */
    text-decoration: none;
    transition: all 0.2s ease-in;
    box-shadow: 5px 5px 2px rgba(150, 150, 150, 0.6);
    border-width:5px;
    border-style: solid;
}
.container p * a:hover{
	height: 72px;
	box-shadow: 7px 7px 6px rgba(150, 150, 150, 0.6);
	border-width:12px;
}
.container p * a.external{
	background-image:none;
}
.container p .en a{
	background-color: #012169; /* 80% transparent blue */
    border-color: #c8102e; /* 5px 80% transparent red */
    color: white;
}
.container p .en a.external:visited{
	color: white;
}
.container p .zh a{
	background-color: #ee1c25; /* 80% transparent blue */
    border-color: #ee1c25; /* 5px 80% transparent red */
    color: #ffff00;
}
.container p .zh a.external:visited{
	color: #ffff00;
}
.container p .ja a{
	background-color: white; /* 80% transparent blue */
    border-color: white; /* 5px 80% transparent red */
    color: #bd0029;
}
.container p .ja a.external:visited{
	color: #bd0029;
}
.container p .ko a{
	background-color: white; /* 80% transparent blue */
    border-color: #000000; /* 5px 80% transparent red */
    color: #CD2E3A;
}
.container p .ko a span{
    color: #0047A0;
}
.container p .ko a.external:visited{
	color: #CD2E3A;
}