一个 table 元素在 firefox 中正常,在 chrome 下长度溢出

2014-02-16 20:36:20 +08:00
 o618
修改了半天还是不行,请问怎么兼容?
2366 次点击
所在节点    问与答
7 条回复
wctbok
2014-02-16 21:07:21 +08:00
table-layout: fixed
试试看
o618
2014-02-16 21:20:45 +08:00
@wctbok 还是不行,代码如下:

<table class="ui-content">
{% for topic in hot_topics %}
<tr class="topic-item">
<td><a href="/u/{{ topic.author_username }}">
<img style="max-width: 24px;max-height: 24px;" src="/static/avatar/s_{{ topic.author_avatar or 'default.png' }}" alt="" class="avatar" />
</a></td>
<td class="title">
<a href="/t/{{ topic.id }}#reply{{ topic.reply_count or 0 }}">{{ topic.title }}</a>
</td>
</tr>
{% endfor %}
</table>
o618
2014-02-16 21:28:50 +08:00
发现英文字符等才会溢出,中文不会
loading
2014-02-16 21:32:09 +08:00
检查下字体,看下浏览器的最小字体
o618
2014-02-16 21:36:06 +08:00
@loading css最小字体:font-size: 12px,这和字体有啥关系?
learnshare
2014-02-16 22:32:51 +08:00
我可能遇到过这个问题,解决方法:包含文字的元素 display 不要是 block
1423
2014-02-16 22:36:18 +08:00
虽然不知道有没有关系。。不过你用没用 mactype ?用了的话试试关掉对 chrome 的

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/100474

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX