Skip to content

Commit

Permalink
Merge pull request #5084 from Aloneduckling/correct-style-example
Browse files Browse the repository at this point in the history
Changed dom-style example code
  • Loading branch information
lmccart authored Mar 13, 2021
2 parents 6d9b03d + 1983eed commit 55af036
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/dom/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -1854,23 +1854,26 @@ p5.Element.prototype._rotate = function() {
* let myDiv = createDiv('I like pandas.');
* myDiv.style('font-size', '18px');
* myDiv.style('color', '#ff0000');
* myDiv.position(0, 0);
* </code></div>
* <div><code class='norender'>
* let col = color(25, 23, 200, 50);
* let button = createButton('button');
* button.style('background-color', col);
* button.position(10, 10);
* button.position(0, 0);
* </code></div>
* <div><code class='norender'>
* let myDiv;
* let myDiv, fontSize;
* function setup() {
* background(200);
* myDiv = createDiv('I like gray.');
* myDiv.position(20, 20);
* myDiv.position(0, 0);
* myDiv.style('z-index', 10);
* }
*
* function draw() {
* myDiv.style('font-size', mouseX + 'px');
* fontSize = min(mouseX, 90);
* myDiv.style('font-size', fontSize + 'px');
* }
* </code></div>
*/
Expand Down

0 comments on commit 55af036

Please sign in to comment.