Move the cursor for input text to the right

前端 未结 3 604
余生分开走
余生分开走 2021-01-27 11:39

I want the the point at which a user types text into a textfield to be moved to the right without moving the margin of the text field to the right. I want this because

相关标签:
3条回答
  • 2021-01-27 11:59

    Padding is what you are looking for.

    .search-box{padding-left: 25px;}
    
    0 讨论(0)
  • 2021-01-27 12:06

    input {
        box-sizing: border-box;
        padding-left: 10px;
        width: 200px;
    }
    <input type="text" />

    0 讨论(0)
  • 2021-01-27 12:13

    I would definately use

    text-indent: 20px;
    

    =)

    0 讨论(0)
提交回复
热议问题