File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,19 @@ body {
6363 z-index : 10 ;
6464}
6565
66+ /* Firefox兼容性修复:控制翻转时按钮的可见性 */
67+ .flip-card-inner .flipped .flip-card-front .help-btn {
68+ visibility : hidden;
69+ opacity : 0 ;
70+ pointer-events : none;
71+ }
72+
73+ .flip-card-inner : not (.flipped ) .flip-card-back .help-btn {
74+ visibility : hidden;
75+ opacity : 0 ;
76+ pointer-events : none;
77+ }
78+
6679.help-btn : hover {
6780 background : # 30a8f7 ;
6881 border-color : # 30a8f7 ;
Original file line number Diff line number Diff line change @@ -598,13 +598,19 @@ export function initFlipCard() {
598598
599599 // 当前旋转角度 / Current rotation angle
600600 let currentRotation = 0 ;
601-
602- // 执行翻转操作 / Execute flip operation
601+ // 执行翻转操作 / Execute flip operation
603602 function performFlip ( ) {
604603 currentRotation += 180 ;
605604 const flipCardInner = flipCard . querySelector ( '.flip-card-inner' ) ;
606605 if ( flipCardInner ) {
607606 flipCardInner . style . transform = `rotateX(${ currentRotation } deg)` ;
607+
608+ // 添加或移除flipped类来控制按钮可见性(Firefox兼容性修复)
609+ if ( currentRotation % 360 === 180 || currentRotation % 360 === - 180 ) {
610+ flipCardInner . classList . add ( 'flipped' ) ;
611+ } else {
612+ flipCardInner . classList . remove ( 'flipped' ) ;
613+ }
608614 }
609615 }
610616
You can’t perform that action at this time.
0 commit comments