2017-02-16 51 views
2

我想要在HTML中这样做,并在输入字段的末尾放置字符。怎么做?谢谢。Сharacter在INPUT的末尾

inputfield with character

+0

请分享您的代码。你在尝试什么HTML对象? –

+0

哦,你的意思是星号? –

回答

3

这里,工作示例:

.required{ 
 
    position:relative; 
 
    right:15px; 
 
    top: 3px; 
 
    color:red; 
 
}
<input type="text" placeholder="John Doe" name="full_name"><span class="required">*</span>

1

这将是更好,容易

.star { 
 
    display: block; 
 
    color: red; 
 
    margin: -20px 185px; 
 
}
<input style="width:200px"> 
 
<span class="star">*</span>
使用相对位置