diff --git a/src/assets/css/community/community.css b/src/assets/css/community/community.css index 9cb0a82d..1c08a2b7 100644 --- a/src/assets/css/community/community.css +++ b/src/assets/css/community/community.css @@ -1,34 +1,11 @@ -/* 设置进入和离开的过渡效果 */ - .post-list .fade-leave-active { transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out; } -.post-list .fade-enter-active { - transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out; -} - -/* 元素进入时,缩放并渐变 */ -.post-list .fade-leave-to /* .fade-leave-active in Vue 2.x */ { - opacity: 0; - transform: scale(0.5); /* 初始状态为缩小 */ -} -.post-list .fade-enter{ - opacity: 0; - transform: scale(0.5); /* 初始状态为缩小 */ -} - -/* 元素进入时恢复到原尺寸 */ -.post-list .fade-enter-to { - opacity: 1; - transform: scale(1); /* 变大恢复正常尺寸 */ -} - -/* 元素离开时,继续保持缩小状态 */ -.post-list .fade-leave-to { - opacity: 0; - transform: scale(0.5); /* 离开时缩小 */ +.post-list .fade-leave-to /* 离开完成后状态 */ +{ + transform: translateX(100%) scale(0.5); /* 离开时从右边滑出并缩小 */ } diff --git a/src/views/community/PostCard.vue b/src/views/community/PostCard.vue index 7846c84b..0432b027 100644 --- a/src/views/community/PostCard.vue +++ b/src/views/community/PostCard.vue @@ -1,11 +1,11 @@