我是新手Angularjs-2.0.我创建了一个示例应用程序,并在加载时遇到问题templateUrl.
我的app.ts文件:
import {bootstrap, Component} from 'angular2/angular2';
@Component({
selector: 'my-app',
templateUrl: 'grid.html'
})
class AppComponent { }
bootstrap(AppComponent);
Run Code Online (Sandbox Code Playgroud)
我改变了路径,./grid.html但它也不适合我.
谁来帮帮我..!
我无法制作它的 width100%和 text middle。正如我在表格中提到的,The problem is here这个地方不是 100% 宽度,文本不在中心。我怎样才能做到?
.hoverTable{
width:100%;
border-collapse:collapse;
}
.hoverTable td{
padding:7px; border:#4e95f4 1px solid;
}
/* Define the default color for all the table rows */
.hoverTable tr{
background: #b8d1f3;
}
/* Define the hover highlight color for the table row */
.hoverTable tr:hover {
background-color: #ffff99;
}
.hoverTable th{
background: #b8d1f3;
}Run Code Online (Sandbox Code Playgroud)
<table class="hoverTable">
<tr>
<th>The problem is here</th>
</tr>
<tr onmouseover="this.style.backgroundColor='#ffff66';"
onmouseout="this.style.backgroundColor='#d4e3e5';">
<td>Item 1A</td>
<td>Item 1B</td>
<td>Item 1C</td> …Run Code Online (Sandbox Code Playgroud)