@logicflow/dumi-theme-simple
Version:
Simple website theme based on dumi2.
169 lines (142 loc) • 2.34 kB
text/less
@import '../_.less';
.news {
width: 50%;
margin-right: 2%;
background-color: #FFFFFF;
border: 1px solid #E5E8EF;
box-shadow: 0 8px 28px 0 rgba(0,0,0,0.05);
border-radius: 16px;
height: 100%;
&:last-child {
margin-right: 0;
}
.container {
height: 100%;
color: #1D2129;
letter-spacing: 0;
.content {
height: 100%;
padding: 0 20px;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
.description {
top: 0;
margin-bottom: 0;
transition: all 0.3s;
font-family: PingFangSC;
font-weight: 500;
font-size: 20px;
text-align: center;
position: relative;
>img {
width: 24px;
height: 24px;
position: relative;
top: -2px;
left: -4px;
}
}
.date,.subTitle {
color: #424E66;
bottom: 0;
font-size: 1em;
margin-top: 4px;
margin-bottom: 0;
text-align: center;
}
}
}
&:hover .description {
color: @secondary-color;
}
}
@media (max-width: 900px) {
.news {
position: absolute;
width: 100%;
&:nth-child(1) {
animation: showAndHide0 9s infinite;
}
&:nth-child(2) {
top: 44px;
animation: showAndHide1 9s infinite;
}
&:nth-child(3) {
top: 44px;
animation: showAndHide2 9s infinite;
}
}
}
@media (max-width: 768px) {
.news {
width: 100%;
}
}
@keyframes showAndHide0 {
0% {
opacity: 1;
top: 0px;
z-index: 1;
}
33.3% {
opacity: 0;
top: 0px;
z-index: 0;
}
66.6% {
opacity: 0;
top: 30px;
z-index: 0;
}
100% {
opacity: 1;
top: 0px;
z-index: 1;
}
}
@keyframes showAndHide1 {
0% {
opacity: 0;
top: 30px;
z-index: 0;
}
33.3% {
opacity: 1;
top: 0px;
z-index: 1;
}
66.6% {
opacity: 0;
top: 0px;
z-index: 0;
}
100% {
opacity: 0;
top: 30px;
z-index: 0;
}
}
@keyframes showAndHide2 {
0% {
opacity: 0;
top: 30px;
z-index: 0;
}
33.3% {
opacity: 0;
top: 30px;
z-index: 0;
}
66.6% {
opacity: 1;
top: 0px;
z-index: 1;
}
100% {
opacity: 0;
top: 0px;
z-index: 0;
}
}