代码之家  ›  专栏  ›  技术社区  ›  anjanesh

为什么材质图标i元素与相邻的输入元素重叠?

  •  1
  • anjanesh  · 技术社区  · 7 年前

    我不确定这是否是一个材料相关的代码或没有。 i 元素比红色边框显示的元素宽。无法导航到文本输入的开头,因为它仍然指向材质图标“帮助\u圆”。

    <!DOCTYPE html>
    <html lang="en" dir="ltr">
    <head>
    <meta charset="utf-8" />
    <link href='https://fonts.googleapis.com/icon?family=Material+Icons' rel='stylesheet' type='text/css'/>
    <style type="text/css">
    div.tipped-small
    {
        margin-top:-10px;
        margin-right:10px;    
        display:inline-block;
        width:15px;
        height:15px;
        padding:5px;
        border-radius:50%;
        cursor:pointer;
        position:relative;
        overflow:none;
    }
    div.tipped-small i
    {
        width:15px;
        color:#4857BA;
        font-size:15px;
        line-height:15px;
        cursor:pointer;    
        position:absolute;
        overflow:none;
    }    
    </style>
    </head>
    <body>
    <div id="container">
        <div class="tipped-small">
            <i class="material-icons" style="border:1px solid red">help_circle</i>        
        </div>    
        <input type="text" style="height:15px;border:1px solid red"/>
    </div>    
    </body>
    </html>
    

    https://codepen.io/anjanesh/pen/LqYXZe

    我怎么才能拿到钱 标签只有15像素?

    0 回复  |  直到 7 年前