追格知识付费小程序分类页我们可以通过仅修改css改变显示效果,下图为原始界面。
1、打开追格知识付费小程序的category.vue在页面中找到css
.jiangqie-topic-type {
width: 49%;
margin-right: 2%;
position: relative;
}
2、然后按以下代码进行修改,修改样式如下:
//注释的是原始css,便于大家参考未做删除,具体调整后的css代码如下:
.jiangqie-topic-type {
// width: 49%;
// margin-right: 2%;
width: 100%;
position: relative;
}
.jiangqie-topic-type:nth-child(2n) {
margin-right: 0;
}
.jiangqie-topic-type image {
width: 100%;
// height: 320rpx;
height: 240rpx;
border-radius: $Q-radio;
}
.jiangqie-topic-type view {
// position: absolute;
// height: 140rpx;
// line-height: 180rpx;
height: 100rpx;
line-height: 60rpx;
// color: $Q-gradual-text-color;
text-align: center;
width: 100%;
bottom: 16rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
// border-radius: 0 0 $Q-radio $Q-radio;
// background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7));
}
对比原始css大家可以更好的了解如何基于现有结构,通过调整css来修改UI,可以结合自己项目情况,将原始界面和修改后的界面混合,改成其他的展示形式。
相关推荐:
追格知识付费小程序发现页分类tab选中状态修改教程
-
wx.onBatteryInfoChange 监听电池信息变化事件 APIwx.onBatteryInfoChange 为微信小程序监听电池信息变化事件 API,,目前只支持监听省电模式的切换,目前仅 iOS 端支持。
-
live-pusher 实时音视频录制媒体组件live-pusher 微信小程序实时音视频录制媒体组件,v2.9.1 起支持同层渲染。需要用户授权 scope.camera、scope.record。
-
open-container容器转场动画组件open-container为微信小程序容器转场动画组件。
-
追格小程序V2.5.0更新发布追格小程序V2.5.0版本的更新,我们没给大家添太多新花样,主要是把“内功”练好了。我们认真检查了上一版里那些组件之间的小摩擦,一点点地调整、优化,搞定了超过40多个小地方。这样一来,小程序跑起来就更顺畅了,大家用起来也会感觉更舒服、更顺手。这次虽然没大张旗鼓,但确实是让产品站得更稳、更可靠了。
-
wx.setStorage 将数据存储在本地缓存中指定的 key 中微信小程序wx.setStorage 将数据存储在本地缓存中指定的 key 中。会覆盖掉原来该 key 对应的内容。除非用户主动删除或因存储空间原因被系统清理,否则数据都一直可用。单个 key 允许存储的最大数据长度为 1MB,所有数据存储上限为 10MB。
-
微信小程序wx.getExtConfig 的同步版本 APIwx.getExtConfig 为微信小程序的同步版本 API。
暂无评论,抢个沙发...