【发布时间】: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 上,有人知道解决方法吗?
【问题讨论】:
-
嗯,不,这是一个 chrome 问题,请参阅下面的答案。感谢您的回复!
标签: php html css google-chrome