javascript verticalAlign property
Translation results:
vertical
English[ˈvɜ:tɪkl] US[ˈvɜ:rtɪkl]
adj. Vertical, upright; [Solution] overhead; vertex ;[Plant]Longitudinal, straight up
n.Vertical line,vertical surface;[Build]Vertical pole;Vertical position
Plural: verticals
align
英[əˈlaɪn] 美[əˈlaɪn]
vt. Make a line, make an alliance; line up neatly
vi. Arrange; make a line
Third person singular: aligns Present participle: aligning Past tense: aligned Past participle: aligned
javascript verticalAlign propertysyntax
Function:Set the vertical alignment of the content in the element box.
Syntax: Object.style.verticalAlign=value
javascript verticalAlign propertyexample
<html> <head> <meta charset="utf-8"> <script type="text/javascript"> function alignText() { document.getElementById("td1").style.verticalAlign="bottom"; } </script> </head> <body> <table border="1" height="100px"> <tr> <td id="td1"> 这是一些示例文字 </td> </tr> </table> <br /> <input type="button" onclick="alignText()" value="Align text" /> </body> </html>
Run instance »
Click the "Run instance" button to view the online instance