eventinvite / static /css /style.css
ichieh
feat: 添加響應式設計支援
495de8c
Raw History Blame Contribute Delete
3.3 kB
.main-container {
display: flex;
justify-content: space-between;
padding: 20px;
gap: 20px;
}
.tables-section {
flex: 2;
display: flex;
flex-wrap: wrap;
gap: 20px;
justify-content: center;
}
.registration-section {
flex: 1;
min-width: 300px;
max-width: 400px;
padding: 20px;
background-color: #f8f9fa;
border-radius: 8px;
position: sticky;
top: 20px;
height: fit-content;
}
.table-circle {
width: 280px;
height: auto;
border-radius: 8px;
border: 2px solid #ddd;
display: flex;
flex-direction: column;
align-items: stretch;
padding: 15px;
margin: 15px;
background-color: white;
transition: all 0.3s ease;
}
.table-circle:hover {
border-color: #007bff;
background-color: #f8f9fa;
}
.table-circle.selected {
border-color: #007bff;
background-color: #e7f1ff;
}
.table-circle.full {
opacity: 0.7;
}
.table-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
padding-bottom: 10px;
border-bottom: 1px solid #eee;
flex-wrap: wrap;
gap: 10px;
}
.table-name {
font-size: 1.2rem;
font-weight: bold;
margin: 0;
}
.select-seat-btn {
padding: 4px 8px;
font-size: 0.9rem;
}
.participants-list {
display: flex;
flex-direction: column;
gap: 5px;
}
.participant-item {
padding: 8px;
border-radius: 4px;
background-color: #f8f9fa;
cursor: pointer;
transition: all 0.2s ease;
}
.participant-item:hover {
background-color: #e9ecef;
}
.participant-item.table-leader {
background-color: #28a745;
color: white;
border-left: 4px solid #1e7e34;
}
.table-circle.full .select-seat-btn {
display: none;
}
.seats-info {
font-size: 1rem;
color: #666;
}
.table-container {
display: inline-block;
margin: 15px;
text-align: center;
}
/* 響應式設計 */
@media (max-width: 768px) {
.main-container {
flex-direction: column;
padding: 10px;
}
.registration-section {
position: static;
max-width: none;
min-width: auto;
order: -1; /* 在手機版中將註冊表單放在最上方 */
margin-bottom: 20px;
}
.tables-section {
flex: none;
width: 100%;
}
.table-circle {
width: 100%;
max-width: none;
margin: 10px 0;
}
.table-header {
flex-direction: column;
align-items: flex-start;
}
.select-seat-btn {
width: 100%;
margin-top: 10px;
}
h1 {
font-size: 1.5rem !important;
margin: 15px 0 !important;
}
.participant-item {
padding: 12px 8px; /* 增加點擊區域 */
}
}
/* 針對更小的手機螢幕 */
@media (max-width: 480px) {
.main-container {
padding: 5px;
}
.table-circle {
padding: 10px;
margin: 5px 0;
}
.registration-section {
padding: 15px;
}
}
/* 確保表單輸入在手機上更容易 */
@media (max-width: 768px) {
input, textarea, select, button {
font-size: 16px !important; /* 防止 iOS 自動縮放 */
padding: 8px !important;
}
.form-control {
margin-bottom: 15px;
}
}