108 lines
2.6 KiB
Plaintext
108 lines
2.6 KiB
Plaintext
/* Floating Ads Style (Responsive Height) */
|
|
|
|
.floating-ad {
|
|
position: fixed;
|
|
top: 150px; /* 헤더 높이만큼 띄움 (필요시 조절) */
|
|
width: 120px; /* 배너 가로폭 고정 */
|
|
z-index: 990;
|
|
|
|
/* 💡 [핵심] Flexbox를 사용하여 높이 분배 */
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 20px; /* 배너 사이 간격 */
|
|
|
|
/* 💡 [핵심] 화면 높이의 80%를 넘지 않도록 제한 */
|
|
max-height: calc(100vh - 200px);
|
|
}
|
|
|
|
.floating-ad.left {
|
|
left: 20px; /* 왼쪽 여백 */
|
|
}
|
|
|
|
.floating-ad.right {
|
|
right: 20px; /* 오른쪽 여백 */
|
|
}
|
|
|
|
.floating-ad a {
|
|
display: block;
|
|
/* 💡 [핵심] 공간을 균등하게 나눠 가짐 */
|
|
flex: 1;
|
|
/* 💡 [핵심] 내용물보다 작아질 수 있도록 허용 (이게 없으면 이미지가 안 줄어듦) */
|
|
min-height: 0;
|
|
overflow: hidden;
|
|
transition: transform 0.2s;
|
|
}
|
|
|
|
.floating-ad a:hover {
|
|
transform: scale(1.05); /* 호버 시 살짝 커짐 */
|
|
}
|
|
/* 💡 [추가] 플로팅 버튼 스타일 */
|
|
.floating-contact-btn {
|
|
display: block;
|
|
margin-top: 15px;
|
|
background-color: #009fe3;
|
|
color: #fff;
|
|
text-align: center;
|
|
padding: 12px 0;
|
|
border-radius: 8px;
|
|
text-decoration: none;
|
|
font-weight: bold;
|
|
transition: background-color 0.3s;
|
|
}
|
|
.floating-contact-btn:hover {
|
|
background-color: #007bb5;
|
|
}
|
|
.floating-ad img {
|
|
width: 100%;
|
|
height: 100%;
|
|
/* 💡 [핵심] 비율을 유지하며 컨테이너 안에 쏙 들어오게 함 */
|
|
object-fit: contain;
|
|
display: block;
|
|
}
|
|
|
|
/* 모바일 반응형 스타일 */
|
|
@media (max-width: 1024px) {
|
|
/* 왼쪽 플로팅 영역 전체 숨김 */
|
|
.floating-ad.left {
|
|
display: none !important;
|
|
}
|
|
|
|
/* 오른쪽 플로팅 영역 스타일 재정의 */
|
|
.floating-ad.right {
|
|
top: auto;
|
|
bottom: 20px;
|
|
right: 15px;
|
|
width: auto;
|
|
max-height: none;
|
|
gap: 0;
|
|
z-index: 999;
|
|
}
|
|
|
|
/* 오른쪽 영역 내의 일반 배너(이미지) 숨김 */
|
|
.floating-ad.right > a:not(.floating-contact-btn) {
|
|
display: none !important;
|
|
}
|
|
|
|
/* 문의하기 버튼 스타일 (모바일용 원형 버튼) */
|
|
.floating-contact-btn {
|
|
margin-top: 0;
|
|
padding: 0;
|
|
width: 50px;
|
|
height: 50px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-shadow: 0 4px 10px rgba(0,0,0,0.3);
|
|
}
|
|
|
|
.floating-contact-btn .text {
|
|
display: none; /* 텍스트 숨김 */
|
|
}
|
|
|
|
.floating-contact-btn .icon {
|
|
font-size: 24px;
|
|
margin: 0;
|
|
}
|
|
}
|