Widget:Teste
Ir para navegação
Ir para pesquisar
<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>