3
在我看来,形式我有台这样的代码:转换表中angularjs div的使用CSS
<table class ="table table-bordered">
<colgroup span="7"></colgroup>
<tbody>
<tr ng-repeat="tr in rows">
<td ng-repeat="td in tr track by $index">
<span ng-bind-html="td"></span>
</td>
</tr>
</tbody>
现在我想从表更改为按股利和下面是我的代码:
<div ng-repeat = "tr in rows">
<div ng-repeat="td in tr track by $index">
<div><span ng-bind-html="td"></span></div>
</div>
</div>
但它不工作,我尝试添加一些CSS是这样的:
<style type="text/css">
div.inline { float:left; }
.clearBoth { clear:both; }
</style>
它根本不起作用。 。有什么建议么?
你能告诉我在上面的例子中如何实现不同宽度为表不同细胞?任何帮助。 – shaaa 2017-02-08 18:00:56
@shaaa与Angular无关,只是CSS。你可以使用'width','padding','margin'等来为单元格添加宽度。对于flex选项,它使用'flex-grow'。我鼓励您在线搜索关于样式化HTML表格和flexbox的文档。 – floribon 2017-02-08 22:34:39