模板:Villager/styles.css
来自星露谷物语扩展百科
更多操作
.villagers {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(128px, 0fr));
gap: 10px;
margin: 20px 0;
justify-content: center;
}
.villagers>div {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
padding: 4px;
transition: all 0.3s ease;
min-height: 150px;
}
.villagers>div:hover {
transform: translateY(-2px);
}
.villagers>div img {
width: 128px;
height: 128px;
object-fit: cover;
margin-bottom: 8px;
flex-shrink: 0;
}
.villagers>div a {
text-decoration: none !important;
color: var(--color-link, #0645ad);
line-height: 1.3;
word-wrap: break-word;
word-break: break-all;
hyphens: auto;
max-width: 100%;
display: block;
}
.villagers>div a:hover {
text-decoration: underline;
}
@media (max-width: 768px) {
.villagers {
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
gap: 8px;
}
.villagers>div {
min-height: 140px;
padding: 8px;
}
.villagers>div img {
width: 100px;
height: 100px;
}
}
@media (max-width: 480px) {
.villagers {
grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
gap: 6px;
}
.villagers>div {
min-height: 130px;
padding: 6px;
}
.villagers>div img {
width: 90px;
height: 90px;
}
}