diff --git a/src/assets/css/community/community.css b/src/assets/css/community/community.css index ff94d122..ee93ecf4 100644 --- a/src/assets/css/community/community.css +++ b/src/assets/css/community/community.css @@ -1,4 +1,38 @@ +/* 设置进入和离开的过渡效果 */ + +.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); /* 离开时缩小 */ +} + + + .communitybase { height: 100vh; @@ -22,10 +56,10 @@ .leftinfo { background-color: rgba(255,255,255,0.8); - width: 15%; + width: 14%; position: fixed; left:0%; - border: 3px solid orchid; + /* border: 3px solid orchid; */ height:100%; } @@ -36,7 +70,7 @@ position: fixed; right:0%; width: 15%; - border: 3px solid orchid; + /* border: 3px solid orchid; */ height:100%; } @@ -71,10 +105,26 @@ left:50%; transform: translateX(-50%); width: 65%; - border: 3px solid orchid; height:100%; z-index:1; } +.follows { + cursor: pointer; + transition: background-color 0.3s ease; +} + +.follows:hover { + background-color: #d0d0d0; +} +.follows.selected { + background-color: rgba(255,255,255,0.8); + font-weight: bold; + color: orchid; +} +.alldongtai:hover{ + background-color: #d0d0d0; + cursor: pointer; +} .post-list { } diff --git a/src/components/PostCard.vue b/src/components/PostCard.vue index 0b2a69fa..c99fa2d5 100644 --- a/src/components/PostCard.vue +++ b/src/components/PostCard.vue @@ -1,49 +1,60 @@ - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/src/views/community/Postform.vue b/src/views/community/Postform.vue new file mode 100644 index 00000000..21ffd55e --- /dev/null +++ b/src/views/community/Postform.vue @@ -0,0 +1,238 @@ + + + + + \ No newline at end of file diff --git a/src/views/community/trends.vue b/src/views/community/trends.vue index dd974e63..6ee4b6fc 100644 --- a/src/views/community/trends.vue +++ b/src/views/community/trends.vue @@ -1,122 +1,150 @@