579579 }
580580
581581 }
582+
583+ /* ===========================
584+ ✅ Diamond carousel FIX
585+ - Desktop: 2 cards centered, arrows on far sides (not on cards)
586+ - Mobile: no side padding (avoid text clipping), arrows smaller & slightly outside
587+ =========================== */
588+
589+ # diamond-sponsor-wrapper {
590+ display : flex;
591+ justify-content : center;
592+ }
593+
594+ # diamond-sponsor-carousel {
595+ width : 100% ;
596+ max-width : 1100px ;
597+ margin : 0 auto;
598+ position : relative !important ;
599+ overflow : visible !important ; /* 允许箭头在外侧显示 */
600+ }
601+
602+ /* 每个 slide 里把 card 居中 */
603+ # diamond-sponsor-carousel .diamond-slide {
604+ padding : 10px ;
605+ display : flex;
606+ justify-content : center;
607+ }
608+
609+ /* 桌面:给箭头留出“安全区”,避免压到卡片上 */
610+ # diamond-sponsor-carousel .owl-stage-outer {
611+ overflow : hidden !important ;
612+ padding : 0 90px !important ; /* 左右留白更大,箭头放这里不会压到卡片 */
613+ }
614+
615+ /* arrows: 强制放到轮播最左右侧 */
616+ # diamond-sponsor-carousel .owl-nav {
617+ position : absolute !important ;
618+ top : 50% !important ;
619+ left : 0 !important ;
620+ right : 0 !important ;
621+ transform : translateY (-50% ) !important ;
622+ pointer-events : none !important ;
623+ margin : 0 !important ;
624+ z-index : 50 !important ;
625+ }
626+
627+ # diamond-sponsor-carousel .owl-nav button {
628+ pointer-events : auto !important ;
629+ position : absolute !important ;
630+ width : 44px !important ;
631+ height : 44px !important ;
632+ border-radius : 999px !important ;
633+ background : rgba (255 , 255 , 255 , 0.92 ) !important ;
634+ box-shadow : 0 2px 8px rgba (0 , 0 , 0 , 0.18 ) !important ;
635+ font-size : 26px !important ;
636+ line-height : 44px !important ;
637+ margin : 0 !important ;
638+ z-index : 60 !important ;
639+ }
640+
641+ /* ✅ 关键:prev/next 固定在最左/最右(不会跑到中间) */
642+ # diamond-sponsor-carousel .owl-nav .owl-prev { left : 18px !important ; }
643+ # diamond-sponsor-carousel .owl-nav .owl-next { right : 18px !important ; }
644+
645+ /* Mobile:不要 stage padding(否则卡片可视区域太窄会裁字) */
646+ @media (max-width : 600px ){
647+ # diamond-sponsor-carousel .owl-stage-outer {
648+ padding : 0 !important ; /* ✅ 解决“文字被裁掉” */
649+ }
650+ # diamond-sponsor-carousel .owl-nav button {
651+ width : 36px !important ;
652+ height : 36px !important ;
653+ font-size : 22px !important ;
654+ line-height : 36px !important ;
655+ }
656+ /* 箭头稍微放到屏幕外侧一点点,尽量不压卡片内容 */
657+ # diamond-sponsor-carousel .owl-nav .owl-prev { left : -6px !important ; }
658+ # diamond-sponsor-carousel .owl-nav .owl-next { right : -6px !important ; }
659+ }
660+
582661 </ style >
583662 < link href ="https://fonts.googleapis.com/css?family=Ubuntu:300 " rel ="stylesheet ">
584663 < link rel ="stylesheet " id ="contact-form-7-css " href ="./styles.css " type ="text/css " media ="all ">
589668 < link rel ="stylesheet " id ="tyler-blueimp-gallery-css " href ="./blueimp-gallery.min.css " type ="text/css " media ="all ">
590669 < link rel ="stylesheet " id ="tyler-jquery-scrollpane-css " href ="./jquery.scrollpane.css " type ="text/css " media ="all ">
591670 < link rel ="stylesheet " id ="tyler-icons-css " href ="./icon.css " type ="text/css " media ="all ">
592- < link rel ="stylesheet " id ="convey-layout-css " href ="./style(1).css " type ="text/css " media ="all ">
671+ < link rel ="stylesheet " id ="convey-layout-css " href ="./style(1).css " type ="text/css " media ="all ">
672+ < link rel ="stylesheet " href ="./owl.carousel.min.css ">
673+ < link rel ="stylesheet " href ="./owl.theme.default.min.css ">
593674 < script type ="text/javascript " src ="./jquery.js "> </ script >
594675 < script type ="text/javascript " src ="./jquery-migrate.min.js "> </ script >
595676 < script type ="text/javascript " src ="./owl.carousel.min.js "> </ script >
@@ -1877,10 +1958,7 @@ <h3 style="font-size: 22px; color:#fff; margin:0;">
18771958 < script type ="text/javascript " src ="./tweetMachine.min.js "> </ script >
18781959 < script type ="text/javascript " src ="./wp-embed.min.js "> </ script >
18791960
1880- <!-- ✅ IMPORTANT: 你 head 里已经有 owl.carousel.min.js,这里就不要再加载一次 -->
1881- <!-- <script type="text/javascript" src="./owl.carousel.min.js"></script> -->
1882- < link rel ="stylesheet " href ="./owl.carousel.min.css ">
1883- < link rel ="stylesheet " href ="./owl.theme.default.min.css ">
1961+
18841962
18851963 <!-- SCROLL UP BTN -->
18861964 < div id ="scroll ">
@@ -1901,9 +1979,6 @@ <h3 style="font-size: 22px; color:#fff; margin:0;">
19011979 }
19021980 </ script >
19031981
1904- <!-- ✅ NEW: Diamond carousel init
1905- - 只有 1 个:不启用(不滚动)
1906- - 2+:每次显示 1 个 -->
19071982 < script >
19081983 jQuery ( document ) . ready ( function ( $ ) {
19091984 var $diamond = $ ( '#diamond-sponsor-carousel' ) ;
@@ -1920,27 +1995,20 @@ <h3 style="font-size: 22px; color:#fff; margin:0;">
19201995 dots : true ,
19211996 navText : [ '❮' , '❯' ] ,
19221997 smartSpeed : 600 ,
1923-
1924- // 3 个以上桌面显示 2 个才需要 loop;手机显示 1 个则 2 个以上也可 loop
1925- loop : ( slideCount > 2 ) ,
1998+ autoplay : true , // ✅ 全局开启(手机/电脑都动)
1999+ autoplayHoverPause : true ,
2000+ autoplayTimeout : 4000 ,
2001+ loop : ( slideCount > 1 ) ,
19262002
19272003 responsive : {
1928- 0 : {
1929- items : 1 ,
1930- autoplay : true , // ✅ 手机也自动滚动
1931- autoplayHoverPause : true ,
1932- autoplayTimeout : 3500
1933- } ,
1934- 768 : {
1935- items : 2 ,
1936- autoplay : true ,
1937- autoplayHoverPause : true ,
1938- autoplayTimeout : 4500
1939- }
2004+ 0 : { items : 1 } ,
2005+ 768 : { items : 2 }
19402006 }
19412007 } ) ;
19422008 } ) ;
19432009 </ script >
19442010
2011+
2012+
19452013</ body >
19462014</ html >
0 commit comments