html, body { height: 100%; margin: 0; } *{ user-select: none; } .record-container { /* 容器样式 */ text-align: center; padding-top: 50px; } .content { display: flex; flex-direction: column; align-items: center; justify-content: center; } .voice-btn-wrap { width: 100%; /* position: fixed; */ /* bottom: 25px; */ left: 0; display: flex; justify-content: center; } .break_btn { position: fixed; right: calc(50% - 120px); background-color: #4CAF50; color: white; border: none; border-radius: 5px; width: 100px; height: 60px; } #record-btn { /* 按钮样式 */ width: 200px; height: 200px; position: fixed; top: 400px; background-color: #4CAF50; /* 淡蓝色背景 */ color: black; /* 文字颜色 */ border: none; border-radius: 50%; /* 圆形按钮 */ cursor: pointer; left: calc(50% - 100px); /* 水平居中按钮 */ display: flex; align-items: center; justify-content: center; font-size: 32px; /* 调整字体大小 */ text-align: center; } #record-btn:active { /* 按钮按下时的样式 */ background-color: #45a049; width: 200px; height: 200px; left: calc(50% - 100px); border-radius: 60%; /* 圆形按钮 */ } .record-popup { /* 弹出窗样式 */ margin-top: 120px; } /* 其他样式调整 */ .voice-line-wrap { display: flex; justify-content: center; align-items: center; height: 50px; /* 可调整高度 */ } .voice-line { width: 5px; height: 20px; /* 初始高度 */ margin: 0 2px; background-color: #4CAF50; animation: wave 1s infinite ease-in-out alternate; } #audio-playback{ position: fixed; top: 250px; left: calc(50% - 150px); } /* 不同的.voice-line将有不同的动画延迟来创建波动效果 */ .voice-line:nth-child(1) { animation-delay: 0s; } .voice-line:nth-child(2) { animation-delay: 0.1s; } .voice-line:nth-child(3) { animation-delay: 0.2s; } .voice-line:nth-child(4) { animation-delay: 0.3s; } .voice-line:nth-child(5) { animation-delay: 0.4s; } .voice-line:nth-child(6) { animation-delay: 0.5s; } .voice-line:nth-child(7) { animation-delay: 0.6s; } @keyframes wave { 0% { height: 20px; } 100% { height: 40px; } /* 动画结束时的高度 */ } /* .record-popup { position: absolute; bottom: var(--popup-bottom); left: calc(50vw - calc(var(--popup-width) / 2)); z-index: 1; width: var(--popup-width); height: var(--popup-height); display: flex; align-items: center; justify-content: center; border-radius: 10rpx; box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1); background: var(--popup-bg-color); color: #000; transition: 0.2s height; } */ .record-popup .inner-content { height: var(--popup-height); font-size: 24rpx; display: flex; flex-direction: column; align-items: center; justify-content: space-between; } .title { font-weight: bold; padding: 20rpx 0; } .tips { color: #999; padding: 20rpx 0; }