2022-06-11 624
HTML <input> align 属性,图片对齐属性
HTML <input> 标签
实例
带有图像提交按钮的 HTML 表单,提交按钮对齐到右边:
<form action="demo_form.html"> First name: <input type="text" name="fname"><br> <input type="image" src="submit.gif" alt="Submit" align="right" width="48" height="48"> </form>
注意:只有 align 属性的 "left" 和 "right" 值能在所有主流浏览器中正常工作。
定义和用法
HTML5 不支持 <input> align 属性。请使用 CSS 代替。
在 HTML 4.01 中,<input> 的 align 属性 已废弃。
align 属性只能与 <input type="image"> 配合使用,它规定图像输入相对于周围其他元素的对齐方式。
兼容性注释
在 HTML 4.01 中,<input> 的 align 属性已废弃。请使用 CSS 代替。
CSS 语法:<input type="image" style="float:right">
在我们的 CSS 教程中,您可以找到更多有关 float 属性的细节。
语法
<input align="left|right|middle|top|bottom">
属性值
值 | 描述 |
left | 左对齐图像(默认)。 |
right | 右对齐对象。 |
top | 上对齐图像。 |
middle | 居中对齐图像。 |
bottom | 下对齐图像。 |
原文链接:https://77isp.com/post/1148.html
=========================================
https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。
数据库技术 2022-03-28
网站技术 2022-11-26
网站技术 2023-01-07
网站技术 2022-11-17
Windows相关 2022-02-23
网站技术 2023-01-14
Windows相关 2022-02-16
Windows相关 2022-02-16
Linux相关 2022-02-27
数据库技术 2022-02-20
抠敌 2023年10月23日
嚼餐 2023年10月23日
男忌 2023年10月22日
瓮仆 2023年10月22日
簿偌 2023年10月22日
扫码二维码
获取最新动态