相关疑难解决方法(0)

在chrome中的Textarea中的行高与游标高度问题

如果我们指定的行高大于font-size,我们可以减少与font-height相同的光标高度吗?看看Chrome浏览器中的这个小提琴,您将得到我正在谈论的内容.这在Firefox中运行良好,问题仅在Chrome浏览器中.Textarea html是:

<TEXTAREA style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 50px; height: 150px;"></TEXTAREA>
Run Code Online (Sandbox Code Playgroud)

编辑:

我想要行之间的行高空间,因为我有textarea的背景图像,水平线我试图放置文本.

html css jquery

11
推荐指数
1
解决办法
3101
查看次数

使用jQuery,Javascript或CSS垂直对齐输入框中的文本光标(插入符号?)

我在CSS中的输入框上乱搞CSS,使文本变大,添加边框,改变颜色等.

我已经使用填充对齐较大的文本以便在我的输入框内很好地适应(垂直对齐),但是小闪烁的文本光标非常对齐(拥抱底部).我想知道是否有办法自行调整闪烁的文本光标而不会弄乱文本的位置.

谢谢!马特

继承人CSS:

div#search_box {
    height:32px;
    width: 366px;
    float:left;
    margin-left:86px;
    margin-top:14px;
    background-color: #ffffff;
    border: 2px solid #b66b01;
}

input#search_input {
    border:none;
    position: relative;
    float: left;
    height: 32px;
    width: 335px;
    font-size: 18px;
    padding-top: 9px;
    padding-left: 4px;
    outline-style:none;
    font-family: Helvetica, Arial, "MS Trebuchet", sans-serif;
    color: #5a5a5a;
}

div#search_icon {
    width:22px;
    height:24px;
    float:right;
    margin-right:5px;
    margin-top:4px;
    cursor: pointer;
    background: url('images/magnifier.png');
}
Run Code Online (Sandbox Code Playgroud)

HTML:

<div id="search_box">
     <input type="text" name="query" id="search_input" autocomplete="off"/>
     <div id="search_icon">
</div>
Run Code Online (Sandbox Code Playgroud)

结果:

搜索http://i26.tinypic.com/29lhjf9.png

html javascript css jquery input

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

css ×2

html ×2

jquery ×2

input ×1

javascript ×1