답변:
이것을 시도하십시오 :
.table-hover tbody tr:hover td, .table-hover tbody tr:hover th {
background-color: #color;
}
이것은 나를 위해 일했습니다.
.table tbody tr:hover td, .table tbody tr:hover th {
background-color: #eeeeea;
}
이것은 imo를 수행하는 가장 간단한 방법이었고 나를 위해 일했습니다.
.table-hover tbody tr:hover td {
background: aqua;
}
제목 색상을 행과 동일한 호버 색상으로 변경하려는 이유는 확실하지 않지만 그렇게한다면 위의 솔루션을 사용할 수 있습니다. 당신이 t를 원한다면
이것은 grunt 또는 다른 작업 실행기를 통해 컴파일 된 부트 스트랩 v4 용입니다.
$table-hover-bg마우스 오버시 강조 표시를 설정하려면 변경해야합니다.
$table-cell-padding: .75rem !default;
$table-sm-cell-padding: .3rem !default;
$table-bg: transparent !default;
$table-accent-bg: rgba(0,0,0,.05) !default;
$table-hover-bg: rgba(0,0,0,.075) !default;
$table-active-bg: $table-hover-bg !default;
$table-border-width: $border-width !default;
$table-border-color: $gray-lighter !default;
$table-hover-bg,$table-active-bg 등등,하지 $table-bg-.... 생각 나는 😅 분 동안 미친 거라고
HTML 코드 :
<table class="table table-hover">
<thead>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<tr>
<td>John</td>
<td>Doe</td>
<td>john@example.com</td>
</tr>
<tr>
<td>Mary</td>
<td>Moe</td>
<td>mary@example.com</td>
</tr>
<tr>
<td>July</td>
<td>Dooley</td>
<td>july@example.com</td>
</tr>
</tbody>
CSS 코드
.table-hover thead tr:hover th, .table-hover tbody tr:hover td {
background-color: #D1D119;
}
CSS 코드는 다음을 나타냅니다.
행 위로 마우스 :
.table-hover> thead> tr : hover
th의 배경색이 # D1D119로 변경됩니다.
일
tbody에 대해서도 동일한 조치가 발생합니다.
.table-hover tbody tr : hover td
예를 들어, Bootstrap의 .table-hover클래스를 사용하여 hoverable rows 를 구현 하십시오.
<table class="table table-hover">
...
</table>
td필요한가요? (죄송합니다 나는 배우려고 노력하고, CSS에서 쓸모 해요)