我有这个代码,有点脏,但功能齐全。 即在safari上没问题,但在chrome和mozilla上不知道为什么参数高度和行高会改变值。
身高:3.125em!重要; - > IE = 50px SAFARI - MOZ CHROME = 132px line-height:3.438em; - > IE = 55px SAFARI - MOZ CHROME = 132px
这是来源:
$html = '<td data-date="'.$year.'-'.$month.'-'.$date.'" class="'.implode(' ',$classes).'" style="height:3.125em !important;">';
$html .= '<span class="date'.($appointments_left ? ' tooltipster" title="'.sprintf( _n('%d time slot','%d time slots',$appointments_left,'booked'), $appointments_left) : '"').'" style="height:3.125em !important; line-height: 3.438em !important;">';
$html .= '<span class="number" >'. $date .'</span></span>';
$html .= '</td>';
由IE和Safari解释
<td data-date="2015-09-31" class="blur" style="height: 3.125em !important;">
<span class="date" "="" style="height: 3.125em !important; line-height: 3.438em !important;">
<span class="number">31</span>
</span>
</td>
主演chrome和mozilla
<td data-date="2015-09-31" class="blur" style="height: 132px;">
<span class="date" "="" style="height: 3.125em ! important; line-height: 132px;">
<span class="number">31</span>
</span>
</td>
感谢那些回复
的人