|
308 | 308 | position: fixed; |
309 | 309 | top: 70px; |
310 | 310 | right: calc((100% - 900px) / 2 + 30px); |
311 | | - width: 36px; |
312 | | - height: 36px; |
| 311 | + width: 32px; |
| 312 | + height: 32px; |
313 | 313 | cursor: pointer; |
314 | | - background: rgba(255, 255, 255, 0.95); |
315 | | - border-radius: 18px; |
| 314 | + background: transparent; |
| 315 | + border-radius: 50%; |
316 | 316 | display: flex; |
317 | 317 | align-items: center; |
318 | 318 | justify-content: center; |
319 | | - box-shadow: 0 2px 8px rgba(0,0,0,0.15); |
320 | 319 | z-index: 1001; |
321 | | - transition: all 0.3s ease; |
322 | | - border: 1px solid rgba(0,0,0,0.08); |
| 320 | + transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); |
| 321 | + border: none; |
| 322 | + outline: none; |
| 323 | + padding: 0; |
| 324 | + opacity: 0.6; |
323 | 325 | } |
324 | 326 |
|
325 | | - .markdown-close::before, |
326 | | - .markdown-close::after { |
| 327 | + .markdown-close::before { |
327 | 328 | content: ''; |
328 | 329 | position: absolute; |
329 | | - width: 18px; |
330 | | - height: 2px; |
331 | | - background: #666; |
332 | | - border-radius: 1px; |
333 | | - transition: background 0.3s; |
| 330 | + width: 40px; |
| 331 | + height: 40px; |
| 332 | + background: rgba(0, 0, 0, 0.05); |
| 333 | + border-radius: 50%; |
| 334 | + transform: scale(0); |
| 335 | + transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); |
| 336 | + } |
| 337 | + |
| 338 | + .markdown-close svg { |
| 339 | + width: 16px; |
| 340 | + height: 16px; |
| 341 | + stroke: #333; |
| 342 | + stroke-width: 2.5; |
| 343 | + transition: all 0.2s ease; |
| 344 | + position: relative; |
| 345 | + z-index: 1; |
334 | 346 | } |
335 | 347 |
|
336 | | - .markdown-close::before { |
337 | | - transform: rotate(45deg); |
| 348 | + .markdown-close:hover { |
| 349 | + opacity: 1; |
338 | 350 | } |
339 | 351 |
|
340 | | - .markdown-close::after { |
341 | | - transform: rotate(-45deg); |
| 352 | + .markdown-close:hover::before { |
| 353 | + transform: scale(1); |
342 | 354 | } |
343 | 355 |
|
344 | | - .markdown-close:hover { |
345 | | - background: #667eea; |
346 | | - box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3); |
347 | | - transform: scale(1.1); |
| 356 | + .markdown-close:hover svg { |
| 357 | + stroke: #000; |
| 358 | + transform: rotate(90deg); |
348 | 359 | } |
349 | 360 |
|
350 | | - .markdown-close:hover::before, |
351 | | - .markdown-close:hover::after { |
352 | | - background: white; |
| 361 | + .markdown-close:active { |
| 362 | + transform: scale(0.95); |
353 | 363 | } |
354 | 364 |
|
355 | 365 | @media (max-width: 900px) { |
356 | 366 | .markdown-close { |
357 | 367 | right: 20px; |
| 368 | + top: 60px; |
358 | 369 | } |
359 | 370 | } |
360 | 371 |
|
@@ -654,7 +665,11 @@ <h2>📚 8 個學習場景</h2> |
654 | 665 | <!-- Markdown Modal --> |
655 | 666 | <div id="markdownModal" class="markdown-modal"> |
656 | 667 | <div class="markdown-content"> |
657 | | - <span class="markdown-close" onclick="closeMarkdown()"></span> |
| 668 | + <button class="markdown-close" onclick="closeMarkdown()" aria-label="關閉"> |
| 669 | + <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| 670 | + <path d="M18 6L6 18M6 6l12 12" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> |
| 671 | + </svg> |
| 672 | + </button> |
658 | 673 | <div id="markdownBody"> |
659 | 674 | <div class="markdown-loading">📡 載入中...</div> |
660 | 675 | </div> |
|
0 commit comments