如果超过某个px,则无法在表中获取单元格以进行滚动

时间:2018-05-07 18:37:57

标签: html5 css3

当文本的长度超过一定大小时,我无法在此处获取代码以在单元格中添加滚轮。我有一个示例html和css,我正在努力寻求帮助:



body {
  font-family: Arial;
  background: lightsteelblue;
}

form {
  background-color: purple;
}

input[type="text"],
select {
  color: grey;
  border: 1px solid lightsteelblue;
  height: 30px;
  line-height: 15px;
  margin: 2px 6px 16px 0px;
}

button[type="submit"],
button.onclick {
  padding: 5px 10px 5px 10px;
  color: black;
  background: lightsteelblue;
  border: none;
  box-shadow: 1px 1px 1px #4C6E91;
}

button[type="submit"]:hover,
button.onclick:hover {
  background: steelblue;
}

select.option {
  text-align: center;
}

tr.comic {
  font-size: 100%;
  background: #000080;
  color: orange;
  text-align: center;
  line-height: 1.2;
  max-height: 60px;
  overflow-y: auto;
}

<table align="center" id="comic_list">
  <tr class="comic">
    <td>random text</td>
    <td>this is a long line of text that needs to be have a scroll attached to it for testing purposes to make sure that this area works. i know this last statement is a runon but its for testing. this space needs to be able to scroll. this text here is just garbage. This text here is to take up space to demenstrate a lage amount of text.Sorry if it makes no sense.</td>
    <td>random text</td>
    <td>random text</td>
    <td>random text</td>
    <td>random text</td>
  </tr>
</table>
&#13;
&#13;
&#13;

JSFiddle

我认为这应该是一个之前已经回答的简单问题,但我找不到适合我的答案。

谢谢Zach

0 个答案:

没有答案
相关问题