HTMLify

style.css
Views: 44 | Author: cody
:root {
    --primary: #DD946F ;
    --secondary: #261E5A;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--secondary);
    font-family: Mulish;
}

.background {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: start;
    padding: 80px 32px;
}
 
.articles {
    display: flex;
    flex-wrap: wrap;
    margin: 0 auto;
    justify-content: center;
    max-width: 1200px;
    gap: 24px;
}
 
.articles article {
    max-width: 320px;
    cursor: pointer;
    position: relative;
    display: block;
    transition: all 0.4s ease-in-out;
    overflow: hidden;
    border-radius: 16px;
}

.articles article a {
    display: inline-flex;
    color: var(--primary);
    text-decoration: none;
}


.articles article h2 {
    margin: 0 0 18px 0;
    font-size: 1.6rem;
    color: var(--secondary);
    transition: color 0.3s ease-out;
}
  
  
.articles article img {
    max-width: 100%;
    transform-origin: center;
    transition: transform 0.4s ease-in-out;
}
  
.article-preview {
    padding: 24px;
    background: white;
}

.articles figure {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.articles figure img {
    height: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    object-fit: cover;
}

.articles article:hover img {
    transform: scale(1.5); 
}

Comments