description Style 안에 스크롤 되게

김태희·2025년 2월 25일

시각화

목록 보기
3/3
const descriptionStyle = css`
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 10px;

  /* ✨ 스크롤 가능하도록 설정 */
  overflow-y: auto;
  max-height: 100%;
  box-sizing: border-box; /* 패딩 포함하여 크기 조절 */

  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  pointer-events: none;
`;

/* ✨ posterContainerStyle 수정 */
const posterContainerStyle = css`
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 245px;
  height: 352px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;

  &:hover .description {
    opacity: 1;
    pointer-events: auto; /* ✨ 추가: hover 시 상호작용 가능하도록 */
  }
`;
profile
내 벨로그

0개의 댓글