Home > Web Front-end > HTML Tutorial > 如何让input文本框和图片对齐_html/css_WEB-ITnose

如何让input文本框和图片对齐_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:30:52
Original
1793 people have browsed it

如何让input文本框和图片对齐:
在默认情况下,input文本框和图片无法垂直居中,总会有所偏差,下面就介绍一下如何实现此效果。
代码如下:

 

<input id="qq" name="qq" style="width:100px;vertical-align:middle" /><img  border="0"   style="max-width:90%"/ alt="如何让input文本框和图片对齐_html/css_WEB-ITnose" >
Copy after login

 

只要给元素添加vertical-align:middle即可实现此功能。

原文地址是:http://www.softwhy.com/forum.php?mod=viewthread&tid=11579

更多内容可以参阅:http://www.softwhy.com/divcss/

 

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template