Difference between revisions of "P5js-DOM-Button"

From Digipool-Wiki
Jump to: navigation, search
Line 15: Line 15:
 
    
 
    
 
   myButton.style('fontFamily', 'times');
 
   myButton.style('fontFamily', 'times');
 +
  myButton.style('fontStyle', 'italic');
 
   button3.style('fontSize', 'large');
 
   button3.style('fontSize', 'large');
 
    
 
    

Revision as of 01:18, 7 March 2020

Diese Beispiel ist 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');
  myButton.style('fontStyle', 'italic');
  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