Difference between revisions of "P5js-DOM-Button"
From Digipool-Wiki
Line 1: | Line 1: | ||
Diese Beispiel it eine Erweiterung des Dom [https://p5js.org/examples/dom-input-and-button.html Examples] auf der p5js Homepage | Diese Beispiel it eine Erweiterung des Dom [https://p5js.org/examples/dom-input-and-button.html Examples] auf der p5js Homepage | ||
+ | <pre> | ||
myButton = createButton('submit'); | myButton = createButton('submit'); | ||
myButton.position(input.x + input.width, 65); | myButton.position(input.x + input.width, 65); | ||
Line 19: | Line 20: | ||
myButton.style('backgroundColor', 'rgb(0,155,0)'); | myButton.style('backgroundColor', 'rgb(0,155,0)'); | ||
myButton.style('borderColor', 'rgb(0,120,0)'); | myButton.style('borderColor', 'rgb(0,120,0)'); | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | Siehe auch [https://www.w3schools.com/jsref/dom_obj_style.asp w3schools HTML DOM Style Object] | ||
<br> | <br> |
Revision as of 00:09, 7 March 2020
Diese Beispiel it eine Erweiterung des Dom Examples auf der p5js Homepage
myButton = createButton('submit'); myButton.position(input.x + input.width, 65); myButton.size(fSize * 3, fSize * 2); myButton.mousePressed(playPause); myButton.style('opacity', 0); myButton.show(); myButton.hide(); myButton.style('borderRadius', '8px'); myButton.style('borderStyle', 'solid'); myButton.style('outlineStyle', 'dashed'); myButton.style('fontFamily', 'times'); button3.style('fontSize', 'large'); myButton.style('color', 'rgb(0,255,0)'); myButton.style('backgroundColor', 'rgb(0,155,0)'); myButton.style('borderColor', 'rgb(0,120,0)');
Siehe auch w3schools HTML DOM Style Object