img和input顶部对不齐解决方法

页面中img和input顶部总对不齐,预览效果如下:



img和input设置vertical-align:middle即可解决:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<style type="text/css">
    input, img {
        width:30px;
        height:30px;
        padding:10px 10px;
        margin:20px 20px;        
        border: 2px inset;
        vertical-align:middle;
    }
</style>
</head>
<body style="margin:0px 0px;">
    <input type="text" value="text" />
    <img src="/Images/search.png" />
</body>
</html>



上一篇: 招商银行朝朝盈业务开通示例
下一篇: 杭州房屋出租户
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
最新日志:
评论: 0 | 引用: 0 | 查看次数: 9143
发表评论
登录后再发表评论!