Javascript examples for CSS Style Property:orphans
Change the orphans and check print or print preview:
Value | Description |
---|---|
number | An integer to set minimum number of visible lines. Negative values are not allowed. The default value is 2 |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |
Item | Value |
---|---|
Default Value: | 2 |
Return Value: | A String, representing the minimum number of lines to print at the bottom of the page |
CSS Version | CSS2 |
<!DOCTYPE html> <html> <body> <p style="background:red;min-width:600px;" id="myP">The minimum width of this paragraph is set to 600px.</p> <button type="button" onclick="myFunction()">test</button> <script> function myFunction() {/*from w w w . j a va 2 s.c om*/ console.log(document.getElementById("myP").style.orphans); } </script> </body> </html>