【问题标题】:select with 300+ options looses styles on Chrome选择 300 多个选项会在 Chrome 上丢失样式
【发布时间】:2015-07-31 15:42:46
【问题描述】:

当你放置一个超过300个标签的标签时,chrome显示它没有任何样式。

要重现,您必须创建一个 php 文件(或 html 文件)并拥有:

<html>
<head>
  <style type="text/css">
    select.green_select {
      color: green;
      font-size: 8pt;
    }
  </style>
</head>
<body>
  <h1>SELECT PROBLEM</h1>
  <?php
    print '<select class="green_select">'."\n";

    for ($i = 1; $i < 301; $i++) {
      print '<option value="'.$i.'">this should be green '.$i.'</option>'."\n";
    }

    print '</select>';

    print '<select class="green_select">'."\n";

    for ($i = 1; $i < 302; $i++) {
      print '<option value="'.$i.'">this should be green '.$i.'</option>'."\n";
    }

    print '</select>';
  ?>
</body>
</html>

生成的 html 显示第一个选择下拉菜单,所有选项均为绿色且字体大小正确,而第二个会删除所有样式。

这只发生在 chrome 上,有人知道解决方法吗?

【问题讨论】:

标签: php html css google-chrome


【解决方案1】:

嗯,这似乎是一个 chrome 问题。 见https://code.google.com/p/chromium/issues/detail?id=513339

我将不得不等待下一个版本的 chrome。 问题出在版本 44 上。

太好了。 :)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-08-17
    • 2015-12-15
    • 1970-01-01
    • 1970-01-01
    • 2011-06-14
    • 1970-01-01
    • 2011-09-03
    相关资源
    最近更新 更多