0
<!DOCTYPE html>
<html>
<head>
  </head>
 <body>
   <div id="divScroll" style="width: 100%;overflow-x: scroll;overflow-y: scroll;">

<table width="100%">
<tr>
    <td>Name</td>
    <td>Name</td>
    <td>Name</td>
     <td>Name</td>
     <td>Name</td>
     <td>Name</td>
     <td>Name</td>
     <td>Name</td>
   <td>Name</td>
   <td>Name</td>
   <td>Name</td>
  </tr>
  <tr>
    <td>abc</td>
    <td>abc</td>
    <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>    
  </tr>
  <tr>
    <td>abc</td>
    <td>abc</td>
    <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
      </tr>
  <tr>
    <td>abc</td>
    <td>abc</td>
    <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
      <td>abc</td>
     <td>abc</td>
     <td>abc</td>
  </tr>
  <tr>
    <td>abc</td>
    <td>abc</td>
    <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
      <td>abc</td>
     <td>abc</td>
     <td>abc</td>
  </tr><tr>
    <td>abc</td>
    <td>abc</td>
    <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
    <td>abc</td>
     <td>abc</td>
     <td>abc</td>
  </tr><tr>
    <td>abc</td>
    <td>abc</td>
    <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
    <td>abc</td>
     <td>abc</td>
     <td>abc</td>
  </tr>
  <tr>
    <td>abc</td>
    <td>abc</td>
    <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
      <td>abc</td>
     <td>abc</td>
     <td>abc</td>
  </tr>
  <tr>
    <td>abc</td>
    <td>abc</td>
    <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
      <td>abc</td>
     <td>abc</td>
     <td>abc</td>
  </tr>
  <tr>
    <td>abc</td>
    <td>abc</td>
    <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
     <td>abc</td>
      <td>abc</td>
     <td>abc</td>
     <td>abc</td>
  </tr>  
    </table>
</div>

</body>
</html>

以上是我的 HTMl 代码 wm 在 IE 中给出水平和垂直滚动条的问题

见 JSbin 演示

4

2 回答 2

4

您需要指定滚动工作的高度和宽度

改变你的

<div id="divScroll" style="width: 100%;overflow-x: scroll;overflow-y: scroll;">

<div id="divScroll" style="width: 300px;height:200px;overflow-x: scroll;overflow-y: scroll;">

你也可以试试这个方法

<div id="divScroll" style="width: 300px;height:200px;overflow:auto;">

检查这个演示

供您参考

于 2012-10-19T10:15:26.840 回答
0

应用一些高度,例如: height: 150px;垂直滚动条......与水平滚动的宽度相同......

<div id="divScroll" style="width: 100%;overflow: scroll; height: 150px;">

无需应用两次溢出-x 和溢出-y 只需使用溢出..

于 2012-10-19T10:30:02.173 回答