/* General reset */ * { margin: 0; padding: 0; box-sizing: border-box; } /* Body & Page Background */ body { display: flex; font-family: 'Arial', sans-serif; background-color: #f5f5f5; flex-direction: column; min-height: 100vh; margin: 0; } main { flex: 1; } footer { background-color: #f8f9fa; text-align: center; padding: 10px 0; } /* Header styles */ header { background-color: #2575fc; padding: 20px; color: white; } .header-container { display: flex; justify-content: space-between; align-items: center; } .site-name h1 { font-size: 24px; } .nav ul { list-style-type: none; display: flex; gap: 20px; } .nav ul li { display: inline; } .nav ul li a { color: white; text-decoration: none; font-size: 16px; } .user-avatar img { width: 40px; height: 40px; border-radius: 50%; } /* Main content styles */ main { padding: 20px; } .course-selection h2 { font-size: 28px; margin-bottom: 20px; } .course-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; } .course-card { background-color: white; display: flex; flex-direction: column; border-radius: 8px; width: 300px; height: 400px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); overflow: hidden; transition: transform 0.3s ease; margin: 0px; } .select-button { display: block; width: 100%; padding: 10px; background-color: #2575fc; color: white; border: none; cursor: pointer; font-size: 16px; margin-top: auto; /* 将按钮推到父元素的底部 */ } .course-card:hover { transform: translateY(-10px); /* 提升效果 */ } .course-card img { width: 100%; height: 261px; object-fit: cover; } .course-card h3 { padding: 15px; font-size: 20px; color: #2575fc; } .course-card p { padding: 0 15px; font-size: 14px; color: #555; } .select-button:hover { background-color: #113c86; } .selected-button { display: block; width: 100%; padding: 10px; background-color: #8a8b8c; color: white; border: none; cursor: pointer; font-size: 16px; cursor: not-allowed; margin-top: auto; /* 将按钮推到父元素的底部 */ } /* Footer styles */ footer { background-color: #333; color: white; text-align: center; padding: 10px; margin-top: 20px; }