【发布时间】:2021-07-18 13:05:00
【问题描述】:
我想编辑表格的行内容(添加填充等)。 如果我将类名放在“%tr”中,什么也不会发生。但是当我把它放在“%th”中时,它就起作用了。当然,我不能对每个人都这样做,因为我认为这不是一个好习惯。 那么我该怎么做才能将所有“%th”放在同一个类中而不复制粘贴 15 次呢?
%div{:style => "overflow-x:auto;"}
%table{:class => "students_table", :border => "1"}
%thead
%tr
%th{:class => "student_table2"} Registration Number
%th Forename
%th Surname
%th Programme Code
%th Deptcode
%th Personaltutor
%th Periodofstudy
%th Access
%th Contact
%th Teaching
%th Exams
%th Practicals
%th Circumstances
%th Recommendations
%th Last updated at
【问题讨论】:
-
欢迎来到 Stack Overflow!为什么不将课程放在
tr上并针对tr.class th { styles }之类的th- 或者您可以完全在每个th上放置一个课程,这不一定是坏习惯。