第 9 步:让我们使用y的值(鼠标的 y 坐标)来设置矩形的高度。

  • 点击并拖出Set Height 。将其放在mouse_move 块内。
  • .set_height()之前的名称更改为my_rect
  • .set_height()中的参数更改为y

我们将my_rect的高度设置为鼠标的 y 坐标!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)