Css 如何保持引导';s条带化表格行样式在使用ember.js时起作用
Ember将脚本标记注入dom,从而阻止引导CSS工作 dom可能看起来像:Css 如何保持引导';s条带化表格行样式在使用ember.js时起作用,css,twitter-bootstrap,ember.js,twitter-bootstrap-3,Css,Twitter Bootstrap,Ember.js,Twitter Bootstrap 3,Ember将脚本标记注入dom,从而阻止引导CSS工作 dom可能看起来像: <table class="table table-striped"> <script id="metamorph ... <tr ... <script id="metamorph ... <script id="metamorph ... <tr ... <script id="metamorph ... <tr ... 您可以使
<table class="table table-striped">
<script id="metamorph ...
<tr ...
<script id="metamorph ...
<script id="metamorph ...
<tr ...
<script id="metamorph ...
<tr ...
您可以使用以下内容覆盖twitter CSS:
/* Override and remove the bootstrap style, as ember breaks it */
.table-striped>tbody>tr:nth-child(odd)>td, .table-striped>tbody>tr:nth-child(odd)>th {
background-color: inherit;
}
/* Instead, use nth-of-type selector to effectively ignore the script tags */
.table-striped>tbody>tr:nth-of-type(odd)>td, .table-striped>tbody>tr:nth-of-type(odd)>th {
background-color: #F9F9F9;
}
您可以使用以下内容覆盖twitter CSS:
/* Override and remove the bootstrap style, as ember breaks it */
.table-striped>tbody>tr:nth-child(odd)>td, .table-striped>tbody>tr:nth-child(odd)>th {
background-color: inherit;
}
/* Instead, use nth-of-type selector to effectively ignore the script tags */
.table-striped>tbody>tr:nth-of-type(odd)>td, .table-striped>tbody>tr:nth-of-type(odd)>th {
background-color: #F9F9F9;
}
或使用:类型的第n个子项
不久的将来,ember将不再需要使用脚本标记。有关更多信息,请签出剩余的大量工作,但这将有助于解决此问题以及更多问题。或使用:n类型的子项
不久的将来,ember将不再需要使用脚本标记。有关更多信息,请查看剩余的大量工作,但这将有助于解决此问题,以及更多问题。您的意思是“类型的第n个”,就像我的解决方案一样;)htmlbars看起来很有前途,但你的意思是“第n种类型”,就像我的解决方案一样;)htmlbars看起来很有希望