.floating-card { position: fixed; right: -150px; /* 默认只显示左边一半 */ top: 50%; transform: translateY(-50%); width: 160px; background: white; border-radius: 10px 0 0 10px; box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1); transition: right 0.3s ease; z-index: 1000; border: 1px solid #e0e0e0; } .floating-btn { position: fixed; right: -10px; top: 30%; transform: translateY(-50%); z-index: 1000; } .floating-btn > button { position: absolute; left: -65px; top: 50%; transform: translateY(-50%) rotate(-90deg); background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 8px 15px; border-radius: 5px 5px 0px 0px; font-weight: bold; font-size: 14px; white-space: nowrap; box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1); border: none; } .floating-card-title { position: absolute; left: -65px; top: 50%; transform: translateY(-50%) rotate(-90deg); background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 8px 15px; border-radius: 5px 5px 0 0; font-weight: bold; font-size: 14px; white-space: nowrap; box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1); } .floating-card:hover { right: 0; /* 鼠标悬停时完全显示 */ } .floating-card-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 15px 20px; border-radius: 10px 0 0 0; font-weight: bold; } .floating-card-body { padding: 20px; } .floating-card-content { margin-bottom: 15px; } .floating-card-content h6 { color: #333; margin-bottom: 8px; font-weight: 600; } .floating-card-content p { color: #666; font-size: 14px; line-height: 1.5; } .floating-card-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); background: white; border-radius: 50%; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); }