模板:游戏card/style.css
来自EaseCation Wiki
更多操作
.fg-flexcontainer-1 {
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin-top: 0.5rem;
}
.fg-card {
flex: 1;
min-width: 280px;
position: relative;
height: 150px;
z-index: 1;
overflow: hidden;
}
.fg-image {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
border-radius: 10px;
overflow: hidden;
z-index: 1;
}
.fg-image img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
border-radius: 10px;
transition: cubic-bezier(0,.8,.2,1) 0.5s;
}
.fg-card:hover .fg-image img {
transform: scale(1.05);
filter: blur(10px);
}
.fg-foreground {
position: absolute;
bottom: 0px;
left: 0;
right: 0;
background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0));
padding: 12px 0 0;
border-radius: 10px;
z-index: 3;
height: 100%;
}
.fg-texts {
position: absolute;
bottom: 0;
left: 0;
transform-origin: left bottom;
transition: all 0.5s cubic-bezier(0,.8,.2,1);
transform: translate(0, 0) scale(1);
}
.fg-card:hover .fg-texts {
transform: translate(8px, -40px) scale(1.1);
}
.fg-foreground-title {
color: white;
font-size: 18px !important;
font-weight: 800 !important;
margin: 2px 0px 0px 16px !important;
}
.fg-foreground-subtitle {
color: white;
font-size: 13px !important;
margin: 0px 0px 2px 16px !important;
line-height: 1.3;
}
.fg-foreground-subtitle-2 {
color: white;
font-size: 12px !important;
margin: 2px 0px 10px 16px !important;
line-height: 1.3;
}
.fg-game-btn {
position: absolute;
bottom: 12px;
right: 16px;
color: #fff !important;
font-size: 14px;
font-weight: 600;
z-index: 4;
transition: all 0.3s ease;
opacity: 0.9;
cursor: pointer;
background: transparent !important;
border: 1px solid rgba(255, 255, 255, 0.8) !important;
border-radius: 10px;
padding: 3px 10px !important;
text-decoration: none !important;
display: inline-block !important;
}
.fg-game-btn a, .fg-game-btn a:visited {
color: #fff !important;
text-decoration: none !important;
}
.fg-game-btn:hover {
opacity: 1;
background: rgba(255, 255, 255, 0.1) !important;
border-color: white !important;
}
.fg-game-btn a:hover {
text-decoration: underline !important;
}
.fg-card:hover .fg-game-btn {
transform: translateY(-5px);
}
.fg-card--button {
overflow: hidden;
padding: 0;
border: 0;
}
@media screen and (max-width: 768px) {
.fg-card {
min-width: calc(100% - 16px);
height: 140px;
}
.fg-foreground-title {
font-size: 16px !important;
}
.fg-foreground-subtitle,
.fg-foreground-subtitle-2 {
font-size: 13px !important;
}
.fg-card:hover .fg-texts {
transform: translate(6px, -35px) scale(1.08);
}
.fg-game-btn {
font-size: 13px;
bottom: 10px;
right: 12px;
padding: 2px 8px !important;
}
.fg-image img {
object-fit: contain;
}
}
@media screen and (max-width: 480px) {
.fg-card {
height: 130px;
}
.fg-foreground {
padding-top: 8px;
}
.fg-foreground-title {
margin-left: 12px !important;
}
.fg-foreground-subtitle,
.fg-foreground-subtitle-2 {
margin-left: 12px !important;
}
.fg-card:hover .fg-texts {
transform: translate(4px, -30px) scale(1.05);
}
.fg-image img {
object-fit: contain;
}
}