V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
o618
V2EX  ›  问与答

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

  •  
  •   o618 · 2014-02-16 20:36:20 +08:00 · 2365 次点击
    这是一个创建于 3746 天前的主题,其中的信息可能已经有所发展或是发生改变。
    修改了半天还是不行,请问怎么兼容?
    7 条回复    1970-01-01 08:00:00 +08:00
    wctbok
        1
    wctbok  
       2014-02-16 21:07:21 +08:00   ❤️ 1
    table-layout: fixed
    试试看
    o618
        2
    o618  
    OP
       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
        3
    o618  
    OP
       2014-02-16 21:28:50 +08:00
    发现英文字符等才会溢出,中文不会
    loading
        4
    loading  
       2014-02-16 21:32:09 +08:00 via iPhone
    检查下字体,看下浏览器的最小字体
    o618
        5
    o618  
    OP
       2014-02-16 21:36:06 +08:00
    @loading css最小字体:font-size: 12px,这和字体有啥关系?
    learnshare
        6
    learnshare  
       2014-02-16 22:32:51 +08:00
    我可能遇到过这个问题,解决方法:包含文字的元素 display 不要是 block
    1423
        7
    1423  
       2014-02-16 22:36:18 +08:00
    虽然不知道有没有关系。。不过你用没用 mactype ?用了的话试试关掉对 chrome 的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   4878 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 07:28 · PVG 15:28 · LAX 00:28 · JFK 03:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.