Проблема при попытке перезаписать цвет строки с помощью пользовательского класса с Bootstrap 3 - PullRequest
0 голосов
/ 20 февраля 2020

Я пытаюсь применить пользовательские цвета к таблице bootstrap vue.

Я хочу применить пользовательский цвет к строке с неактивным классом.

enter image description here

Это то, что я пробовал до сих пор, но безуспешно (этот код находится в компоненте VueJS):

<style scoped>
    table tbody tr td {
        padding: 20px;
    }
    .inactive{
        background: #038a0a !important;
    }
</style>

Спасибо за ребята, помогите!

1 Ответ

0 голосов
/ 20 февраля 2020

Кажется, что он работает нормально, когда я пытаюсь с Bootstrap

new Vue({
  el: '#app',
  
})
<style scoped>
    table tbody tr td {
        padding: 120px;
        background-color:"red"
    }
    .inactive{
        background: #038a0a !important;
    }
</style>
<script src="https://unpkg.com/vue"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">

<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>

<div id="app">
  <table class="table">
  <thead>
    <tr>
      <th scope="col">#</th>
      <th scope="col">First</th>
      <th scope="col">Last</th>
      <th scope="col">Handle</th>
    </tr>
  </thead>
  <tbody>
    <tr class="inactive">
      <th scope="row">1</th>
      <td>Mark</td>
      <td>Otto</td>
      <td>@mdo</td>
    </tr> 
    <tr>
      <th scope="row">2</th>
      <td>Jacob</td>
      <td>Thornton</td>
      <td>@fat</td>
    </tr>
    <tr>
      <th scope="row">3</th>
      <td>Larry</td>
      <td>the Bird</td>
      <td>@twitter</td>
    </tr>
  </tbody>
</table>
</div>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...