Skip to content

Commit 9f74070

Browse files
fix: center text in countdown
1 parent d31f20a commit 9f74070

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/components/CountdownBar.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,14 @@ onUnmounted(() => {
7171
7272
.time-left {
7373
position: absolute;
74-
top: 50%;
75-
left: 50%;
76-
transform: translate(-50%, -50%);
74+
top: 0;
75+
left: 0;
76+
width: 100%;
77+
height: 100%;
7778
color: #000;
7879
font-weight: bold;
7980
text-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
81+
text-align: center;
82+
line-height: 40px;
8083
}
8184
</style>

0 commit comments

Comments
 (0)