版权声明:正在学习中,有错误欢迎指出。感谢比❤❤~ https://blog.csdn.net/gx17864373822/article/details/82561182
td{
width: 7em;//最多x个字,则为 x em
}
.w2{
letter-spacing: 5em;
/*如果需要y个字两端对齐,则为(x-y)/(y-1),这里是(7-5)/(5-1) = 5em */
margin-right: -5em;
/*同上*/
}
.w4{
letter-spacing: 1em;
margin-right: -1em;
}
.w7{
letter-spacing: 0em;
margin-right: -0em;
}
<tr>
<td class="w7">就读或毕业学校</td>
<td>@if($teacher->school()->exists()){{$teacher->school()->first()->name}}@endif</td>
</tr>
<tr>
<td class="w7">可教授年级科目</td>
<td>
@foreach($courses as $course)
{{$course->rank()->first()->name}}{{$course->course()->first()->name}}、
@endforeach
</td>
</tr>
<tr>
<td class="w2">电话</td>
<td>{{$teacher->phone}}</td>
</tr>