/* Teacherboard 样式 */ .teacherboard { padding: 20px; font-family: Arial, sans-serif; } .teacherboard-title { text-align: center; font-size: 32px; margin-bottom: 20px; } .course-cards { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 20px; } .course-card { width: 250px; background-color: #f9f9f9; padding: 20px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); cursor: pointer; } .course-image { width: 100%; height: 150px; object-fit: cover; border-radius: 5px; } .course-info { margin-top: 10px; } .course-name { font-size: 20px; font-weight: bold; } .course-description { font-size: 14px; color: #555; } /* 课程目录弹出框 */ .course-details { position: fixed; top: 0; right: -400px; width: 300px; height: 100%; background-color: #fff; box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1); padding: 20px; transition: right 0.3s ease; z-index: 9999; border-radius: 15px; /* 添加圆角 */ } .course-details.open { right: 0; /* 打开时显示 */ } .details-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } .details-header button { background-color: transparent; border: none; font-size: 24px; cursor: pointer; } .details-content { padding-right: 20px; } .lesson-item { display: flex; align-items: center; justify-content: space-between; /* 让垃圾桶靠右 */ padding: 5px 0; } .lesson-text { cursor: pointer; /* 鼠标悬停时变成手指 */ transition: color 0.3s; flex: 1; /* 占据左侧空间 */ } .lesson-text:hover { color: #2575fc; /* 这里你可以设置悬停时的颜色 */ } .icon-btn { background: none; border: none; cursor: pointer; margin-left: 8px; color: #666; font-size: 14px; transition: color 0.2s; } .icon-btn:hover { color: #2575fc; /* hover 高亮 */ } .delete-btn { color: #c0392b; /* 红色垃圾桶 */ } .delete-btn:hover { color: #e74c3c; } .new-chapter-input { width: 200px; padding: 8px; margin-top: 10px; margin-bottom: 10px; font-size: 14px; border-radius: 4px; border: 1px solid #ddd; } .icon-btn { background: none; border: none; cursor: pointer; margin-left: 8px; color: #666; font-size: 14px; transition: color 0.2s; } .icon-btn:hover { color: #2575fc; /* hover 高亮 */ } .delete-btn { color: #c0392b; /* 红色垃圾桶 */ } .delete-btn:hover { color: #e74c3c; } .add-chapter-btn { background-color: #2575fc; color: white; padding: 10px; border-radius: 5px; cursor: pointer; } /* 编辑弹窗 */ .edit-modal { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 400px; background-color: white; padding: 20px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); } .edit-modal-content { display: flex; flex-direction: column; } .edit-modal-content input, .edit-modal-content textarea { margin-bottom: 10px; padding: 10px; font-size: 16px; border: 1px solid #ddd; border-radius: 5px; } .edit-modal-content button { background-color: #2575fc; color: white; padding: 10px; border-radius: 5px; cursor: pointer; }