def setup
background(220)
b1 = createButton('button 1')
b2 = createButton('button 2')
b3 = createButton('button 3')
b1.position(10, 10)
b2.position(20, 40)
b3.position(30, 70)
end
要素の表示位置を設定または取得します。
| 引数名 | 内容 | 備考 | オプション | デフォルト値 |
|---|---|---|---|---|
| x | 要素の左上 x座標 | ○ | 未詳 | |
| y | 要素の左上 y座標 | ○ | 未詳 | |
| positionType | タイプ | 'static' 'fixed' 'relative' 'sticky' 'initial' 'inherit' | ○ | 'relative' |
r : ハッシュ {x: x座標, y: y座標}