.departmentItem { display: flex; flex-shrink: 0; justify-content: space-between; flex: 1; width: 100%; .name { flex-shrink: 0; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1; } .btnsBox { display: none; .edit { width: 24px; color: #1890ff; &:hover { color: #40a9ff; } } .del { width: 24px; color: #ff4d4f; &:hover { color: #ff7875; } } } &:hover .btnsBox { display: inline-flex; } }