Html程序  |  47行  |  1.04 KB

<!DOCTYPE html>
<html>
  <head>
    <style>
      .container {
        margin: 10px;
        width: 300px;
        height: 200px;
        background-color: grey;
      }

      .static {
        display: static;
      }

      .inline-block {
        display: inline-block;
      }

      .floatleft {
        float: left;
      }

      *[draggable=true] {
        width: 100px;
        height: 100px;
        margin: 10px;
        background-color: green;
      }
    </style>
  </head>
  <body>
    <div class="container inline-block static">
      display: inline-block; position: static;
      <div draggable="true">Drag Me</div>
      If the drag-icon follows the mouse pointer while dragging the above green block, the test passes.
    </div>

    <div class="container" style="overflow:hidden">
        greybox overflow:hidden; greenbox float:left;<br>
        <div class="floatleft" draggable="true">Drag Me</div>
        If the drag-icon follows the mouse pointer while dragging the green block to the left, the test passes.
    </div>

  </body>
</html>