File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1854,23 +1854,26 @@ p5.Element.prototype._rotate = function() {
18541854 * let myDiv = createDiv('I like pandas.');
18551855 * myDiv.style('font-size', '18px');
18561856 * myDiv.style('color', '#ff0000');
1857+ * myDiv.position(0, 0);
18571858 * </code></div>
18581859 * <div><code class='norender'>
18591860 * let col = color(25, 23, 200, 50);
18601861 * let button = createButton('button');
18611862 * button.style('background-color', col);
1862- * button.position(10, 10 );
1863+ * button.position(0, 0 );
18631864 * </code></div>
18641865 * <div><code class='norender'>
1865- * let myDiv;
1866+ * let myDiv, fontSize ;
18661867 * function setup() {
18671868 * background(200);
18681869 * myDiv = createDiv('I like gray.');
1869- * myDiv.position(20, 20);
1870+ * myDiv.position(0, 0);
1871+ * myDiv.style('z-index', 10);
18701872 * }
18711873 *
18721874 * function draw() {
1873- * myDiv.style('font-size', mouseX + 'px');
1875+ * fontSize = min(mouseX, 90);
1876+ * myDiv.style('font-size', fontSize + 'px');
18741877 * }
18751878 * </code></div>
18761879 */
You can’t perform that action at this time.
0 commit comments