styles.css 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /**
  2. * 医疗语音助手样式文件
  3. */
  4. /* 语音按钮样式 */
  5. #medical-voice-btn {
  6. position: fixed;
  7. bottom: 100px;
  8. right: 30px;
  9. z-index: 10000;
  10. padding: 15px 20px;
  11. background-color: #4CAF50;
  12. color: white;
  13. border: none;
  14. border-radius: 50px;
  15. cursor: pointer;
  16. font-size: 16px;
  17. font-weight: bold;
  18. box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  19. transition: all 0.3s ease;
  20. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  21. }
  22. #medical-voice-btn:hover {
  23. background-color: #45a049;
  24. transform: translateY(-2px);
  25. box-shadow: 0 6px 12px rgba(0,0,0,0.15);
  26. }
  27. #medical-voice-btn:active {
  28. transform: translateY(0);
  29. box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  30. }
  31. /* 录音中的按钮样式 */
  32. #medical-voice-btn.recording {
  33. background-color: #f44336;
  34. animation: pulse 1.5s infinite;
  35. }
  36. @keyframes pulse {
  37. 0%, 100% {
  38. box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7);
  39. }
  40. 50% {
  41. box-shadow: 0 0 0 10px rgba(244, 67, 54, 0);
  42. }
  43. }
  44. /* 消息提示框样式 */
  45. #medical-voice-message {
  46. position: fixed;
  47. top: 20px;
  48. right: 20px;
  49. background: #333;
  50. color: white;
  51. padding: 15px 25px;
  52. border-radius: 5px;
  53. z-index: 10001;
  54. font-size: 14px;
  55. box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  56. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  57. max-width: 300px;
  58. word-wrap: break-word;
  59. }
  60. /* 消息提示框动画 */
  61. #medical-voice-message.show {
  62. animation: slideIn 0.3s ease-out;
  63. }
  64. @keyframes slideIn {
  65. from {
  66. transform: translateX(400px);
  67. opacity: 0;
  68. }
  69. to {
  70. transform: translateX(0);
  71. opacity: 1;
  72. }
  73. }
  74. /* 成功消息样式 */
  75. #medical-voice-message.success {
  76. background: #4CAF50;
  77. }
  78. /* 错误消息样式 */
  79. #medical-voice-message.error {
  80. background: #f44336;
  81. }
  82. /* 警告消息样式 */
  83. #medical-voice-message.warning {
  84. background: #ff9800;
  85. }
  86. /* 高亮填写的字段 */
  87. .medical-voice-highlight {
  88. background-color: #fff3cd !important;
  89. border: 2px solid #ffc107 !important;
  90. animation: highlightFade 3s ease-out forwards;
  91. }
  92. @keyframes highlightFade {
  93. 0% {
  94. background-color: #fff3cd;
  95. border: 2px solid #ffc107;
  96. }
  97. 100% {
  98. background-color: transparent;
  99. border: 1px solid #ccc;
  100. }
  101. }