• 两个input在一行让它们能对齐


    input明明写在同一行,高度也一样,在不同的浏览器或者手机上显示却不一样,经常会出现这样的情况

    <input type="text" name="verify" placeholder ="请输入验证码" class="verify" /><input type="button" value="发送验证码" class="verify_code" />

    加margin,padding都没能解决这个问题,网上搜了看到有人说给两个input加float可以实现对齐,鉴于浮动带来的一系列副作用来讲,

    浮动虽然能解决这个问题,但浮动并不是最好的方法

    实践中发现了另一个很好的解决办法,就是用我们熟悉的line-height

    input{height:30px;line-height:30px;}

    这样就好了,解决这个问题

  • 相关阅读:
    golang linux安装
    vscode 插件
    windows访问eks pods
    go mod包管理
    beego创建项目
    Atcoder ARC-125
    AtCoder AGC003 简要题解
    Python 字符串转成变量名
    13_Go基础(binary)
    12_Go基础(iota)
  • 原文地址:https://www.cnblogs.com/leiting/p/7593142.html
Copyright © 2020-2023  润新知