HTML 参考手册
HTML <input> align 属性
CSS 实例:对齐输入图像
源代码:
点击运行 »
<!DOCTYPE html> <html> <body> <form action="form_submit.php" method="get"> First name: <input type="text" name="fname"><br> Last name: <input type="text" name="lname"><br> <input type="image" src="/examples/submit.gif" alt="Submit" style="float:right" width="48" height="48"> <p>This is some text This is some text This is some text This is some text This is some text This is some text This is some text This is some text.</p> </form> <p>Click on the image, and the input will be sent to a page on the server called "form_submit.php".</p> <p><b>Note:</b> The image input type sends the X and Y coordinates of the click that activated the image button as default.</p> </body> </html>
运行结果:
点击运行 »