Mudanças entre as edições de "Widget:Teste"
Ir para navegação
Ir para pesquisar
| Linha 1: | Linha 1: | ||
< | <div class="news-carousel"> | ||
< | <a class="news-card" href="#"> | ||
<div class="news-image"> | |||
<img src="https://wiki.gla.com.br/images/1/14/AlcoolOleoShipLv5.png"> | |||
</div> | |||
<div class="news-content"> | |||
<div class="news-title">Título da Notícia</div> | |||
<div class="news-sub">Ver mais</div> | |||
</div> | |||
</a> | |||
<a class="news-card" href="#"> | |||
<div class="news-image"> | |||
<img src="https://wiki.gla.com.br/images/1/14/AlcoolOleoShipLv5.png"> | |||
</div> | |||
<div class="news-content"> | |||
<div class="news-title">Título 2</div> | |||
<div class="news-sub">Ver mais</div> | |||
</div> | |||
</a> | |||
</div> | </div> | ||
<style> | <style> | ||
.news- | .news-carousel { | ||
display: flex; | |||
gap: 16px; | |||
overflow-x: auto; | |||
scroll-snap-type: x mandatory; | |||
} | scroll-padding: 16px; | ||
padding-bottom: 8px; | |||
-webkit-overflow-scrolling: touch; | |||
} | |||
.news-card { | |||
background-color: #1f1f1f; | |||
color: white; | |||
border-radius: 6px; | |||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); | |||
overflow: hidden; | |||
display: flex; | |||
flex-direction: column; | |||
scroll-snap-align: start; | |||
min-width: 100%; | |||
max-width: 100%; | |||
text-decoration: none; | |||
transition: transform 0.2s ease; | |||
} | |||
.news-card:hover .news-image img { | |||
transform: scale(1.05); | |||
} | |||
.news-card:hover { | |||
cursor: pointer; | |||
} | |||
.news- | .news-image { | ||
width: 100%; | |||
height: 160px; | |||
overflow: hidden; | |||
} | |||
} | |||
.news- | .news-image img { | ||
width: 100%; | |||
height: 100%; | |||
object-fit: cover; | |||
} | transition: transform 0.3s ease; | ||
display: block; | |||
} | |||
.news-content { | .news-content { | ||
padding: 10px 12px; | |||
} | } | ||
.news-title { | .news-title { | ||
font-weight: bold; | |||
font-size: 14px; | |||
margin-bottom: 4px; | |||
} | color: white; | ||
} | |||
.news-sub { | .news-sub { | ||
font-size: 12px; | |||
color: #ccc; | |||
} | } | ||
@media screen and (min-width: 600px) { | |||
@media screen and (min-width: 600px) { | .news-card { | ||
min-width: calc(50% - 8px); | |||
max-width: calc(50% - 8px); | |||
} | |||
} | } | ||
@media screen and (min-width: 1000px) { | @media screen and (min-width: 1000px) { | ||
.news-card { | |||
min-width: calc(33.333% - 10.6px); | |||
max-width: calc(33.333% - 10.6px); | |||
} | } | ||
} | |||
</style> | </style> | ||
Edição das 01h20min de 2 de junho de 2025
<a class="news-card" href="#">
Título da Notícia
Ver mais
</a>
<a class="news-card" href="#">
Título 2
Ver mais
</a>
<style>
.news-carousel {
display: flex;
gap: 16px;
overflow-x: auto;
scroll-snap-type: x mandatory;
scroll-padding: 16px;
padding-bottom: 8px;
-webkit-overflow-scrolling: touch;
}
.news-card {
background-color: #1f1f1f;
color: white;
border-radius: 6px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
overflow: hidden;
display: flex;
flex-direction: column;
scroll-snap-align: start;
min-width: 100%;
max-width: 100%;
text-decoration: none;
transition: transform 0.2s ease;
}
.news-card:hover .news-image img {
transform: scale(1.05);
}
.news-card:hover {
cursor: pointer;
}
.news-image {
width: 100%;
height: 160px;
overflow: hidden;
}
.news-image img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s ease;
display: block;
}
.news-content {
padding: 10px 12px;
}
.news-title {
font-weight: bold;
font-size: 14px;
margin-bottom: 4px;
color: white;
}
.news-sub {
font-size: 12px;
color: #ccc;
}
@media screen and (min-width: 600px) {
.news-card {
min-width: calc(50% - 8px);
max-width: calc(50% - 8px);
}
}
@media screen and (min-width: 1000px) {
.news-card {
min-width: calc(33.333% - 10.6px);
max-width: calc(33.333% - 10.6px);
}
}
</style>