웹솔루션개발 25년 노하우! 해피CGI의 모든것

[해피CGI][cgimall] 평점이 나오는 마우스 오버 효과 Movie Poster Interaction 본문

웹프로그램밍 자료실/HTML 자료

[해피CGI][cgimall] 평점이 나오는 마우스 오버 효과 Movie Poster Interaction

해피CGI윤실장 2025. 5. 12. 09:04



마우스를 올리면 제목, 평점 등 다양한 정보가 나타나는 마우스 오버 효과입니다.

응용하여 다양하게 활용 가능합니다.


HTML 구조

 

.
.
.
자세한 소스는 데모 사이트를 통해 확인해 주세요.

 



CSS 소스

body {

    display: flex;

    align-items: center;

    justify-content: center;

    min-height: 100vh;

    background: #f5f5f5;

}

 

.wrapper {

    position: relative;

    width: 100%;

    height: 100%;

    padding: 20px;

    display: flex;

    align-content: center;

    justify-content: center;

    gap: 24px;

    flex-wrap: wrap;

}

 

.card {

    position: relative;

    width: 325px;

    height: 450px;

    background: #000;

    border-radius: 18px;

    overflow: hidden;

    box-shadow: 0 5px 10px rgba(0, 0, 0, .2);

}

 

.poster {

    position: relative;

    top: 0;

    left: 0;

    width: 100%;

    height: 100%;

    overflow: hidden;

}

 

.poster::before {

    content: '';

    position: absolute;

    bottom: -45%;

    left: 0;

    width: 100%;

    height: 100%;

    z-index: 1;

    transition: .3s;

}

 

.card:hover .poster::before {

    bottom: 0;

}

 

.poster img {

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 100%;

    object-fit: cover;

    transition: .3s;

}

 

.card:hover .poster img {

    transform: scale(1.1);

}

 

.details {

    position: absolute;

    bottom: -100%;

    left: 0;

    width: 100%;

    height: auto;

    padding: 1.5em 1.5em 2em;

    background: #000a;

    backdrop-filter: blur(16px) saturate(120%);

    transition: .3s;

    color: #fff;

    z-index: 2;

}

 

.card:hover .details {

    bottom: 0;

}

 

.details h1,

.details h2 {

    font-weight: 700;

}

 

.details h1 {

    font-size: 1.5em;

    margin-bottom: 5px;

}

 

.details h2 {

    font-weight: 400;

    font-size: 1em;

    margin-bottom: 10px;

    opacity: .6;

}

 

.details .rating {

    position: relative;

    margin-bottom: 15px;

    display: flex;

    gap: .25em;

}

 

.details .rating i {

    color: #e3c414;

}

 

.details .rating span {

    margin-left: 0.25em;

}

 

.
.
.

 

해당 사이트로 이동해서 전체 소스를 확인하실 수 있습니다.

 

Comments