فهرست منبع

修改轨道背景

丸子 4 ماه پیش
والد
کامیت
6930bfc87b
1فایلهای تغییر یافته به همراه7 افزوده شده و 8 حذف شده
  1. 7 8
      src/views/programming/ProgrammingCourset.vue

+ 7 - 8
src/views/programming/ProgrammingCourset.vue

@@ -453,7 +453,8 @@ const goBackIndex = () => {
 }
 
 .content-box {
-  min-width: rpx(660);
+  width: 100%;
+  min-width: rpx(660); /* 最小宽度 */
   height: 100%;
   overflow-x: auto; /* 水平滚动条 */
   overflow-y: hidden; /* 取消上下滚动 */
@@ -464,13 +465,13 @@ const goBackIndex = () => {
   flex: 1;
   cursor: grab; /* 显示可抓取图标 */
   z-index: 2; 
-  padding: 0  rpx(30);
-  /* 设置背景图 */
+  padding: 0 rpx(30);
+  /* 设置背景图 - 确保背景图大小始终一致 */
   background-image: url('@/assets/programming/track01.png');
-  background-size: 150% rpx(350);
-  background-position: left calc(-1 * rpx(50));;
+  background-size: 180% rpx(350); /* 固定背景图大小 */
+  background-position: left calc(-1 * rpx(50));
   background-repeat: no-repeat;
-  background-attachment: local; /* 背景图随内容滚动 */
+  background-attachment: scroll; /* scroll背景图位置固定 */
 }
 
 /* 鼠标按下时的光标样式 */
@@ -488,8 +489,6 @@ const goBackIndex = () => {
   scrollbar-width: none;
 }
 
-/* 背景图样式已整合到content-box中,此处样式已移除 */
-
 .slide-item {
   width: rpx(140); /* 设置固定宽度 */
   height: rpx(120); /* 高度设置 */