diff --git a/1.py b/1.py new file mode 100644 index 0000000..e69de29 diff --git a/pages/index/index.wxss b/pages/index/index.wxss index beb4936..c97172f 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -4,13 +4,13 @@ background: linear-gradient(180deg, #f5faff 0%, #f0f8ff 100%); } -/* ===== 2. 公告栏样式 - 物理上移方案 ===== */ +/* ===== 2. 公告栏样式 ===== */ .gonggao-box { margin: 20rpx 30rpx; height: 80rpx; border-radius: 40rpx; - background: linear-gradient(135deg, - rgba(220, 255, 220, 0.85) 0%, + background: linear-gradient(135deg, + rgba(220, 255, 220, 0.85) 0%, rgba(255, 255, 200, 0.85) 100%); backdrop-filter: blur(10px); display: flex; @@ -18,10 +18,9 @@ padding: 0 25rpx; box-shadow: 0 4rpx 15rpx rgba(0, 100, 0, 0.08); border: 1rpx solid rgba(255, 255, 255, 0.3); - position: relative; overflow: hidden; } - + .gonggao-icon { width: 40rpx; height: 40rpx; @@ -30,47 +29,33 @@ display: flex; align-items: center; } - + .gonggao-icon image { width: 100%; height: 100%; } - + .gonggao-content { flex: 1; overflow: hidden; - height: 100%; - position: relative; + height: 80rpx; + display: flex; + margin-top: 2px; /* 视觉上的微小修正 */ } - - /* 关键修改:使用物理上移 */ + .gonggao-text { font-size: 26rpx; color: #333; white-space: nowrap; padding-right: 50rpx; - - /* 物理上移方法1:直接调整位置 */ - position: absolute; - top: -5rpx; /* 从顶部开始计算位置 */ - left: 0; - - /* 或者使用方法2:负margin上移 */ - /* position: relative; - top: -10rpx; */ - - /* 或者使用方法3:translate上移 */ - /* transform: translateY(-5rpx); */ + line-height: 1; } - - /* 尝试不同的上移值,直到居中为止 */ - /* 可以尝试的值:5rpx, 8rpx, 10rpx, 12rpx, 15rpx, 18rpx, 20rpx */ - + .gonggao-anim { - animation: marquee 10s linear infinite; /* 加快速度到10秒 */ + animation: marquee 10s linear infinite; animation-delay: 0.5s; } - + @keyframes marquee { 0% { transform: translateX(100%); diff --git a/project.config.json b/project.config.json index 98702e3..ba985c2 100644 --- a/project.config.json +++ b/project.config.json @@ -1,29 +1,42 @@ -{ - "compileType": "miniprogram", - "setting": { - "coverView": true, - "es6": true, - "postcss": true, - "minified": true, - "enhance": true, - "showShadowRootInWxmlPanel": true, - "packNpmRelationList": [], - "babelSetting": { - "ignore": [], - "disablePlugins": [], - "outputPath": "" - }, - "ignoreUploadUnusedFiles": true - }, - "condition": {}, - "editorSetting": { - "tabIndent": "insertSpaces", - "tabSize": 4 - }, - "libVersion": "3.14.3", - "packOptions": { - "ignore": [], - "include": [] - }, - "appid": "wx0e4be86faac4a8d1" +{ + "compileType": "miniprogram", + "setting": { + "coverView": true, + "es6": true, + "postcss": true, + "minified": true, + "enhance": true, + "showShadowRootInWxmlPanel": true, + "packNpmRelationList": [], + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + }, + "ignoreUploadUnusedFiles": true, + "compileWorklet": false, + "uglifyFileName": false, + "uploadWithSourceMap": true, + "packNpmManually": false, + "minifyWXSS": true, + "minifyWXML": true, + "localPlugins": false, + "disableUseStrict": false, + "useCompilerPlugins": false, + "condition": false, + "swc": false, + "disableSWC": true + }, + "condition": {}, + "editorSetting": { + "tabIndent": "insertSpaces", + "tabSize": 4 + }, + "libVersion": "3.14.3", + "packOptions": { + "ignore": [], + "include": [] + }, + "appid": "wx0e4be86faac4a8d1", + "simulatorPluginLibVersion": {} } \ No newline at end of file