请告诉我如何在输入字段中输入的文本中添加样式padding-left或margin-left
<input name="keyword" type="text" placeholder="Job title, Keywords or Company Name"/>
有多种添加样式的方法。
最优选的是
<input name="keyword" type="text" class="txtCSS" placeholder="Job title, Keywords or Company Name"/>
然后为该类添加样式,例如,
.txtCSS{
margin-left: 10px;
padding-left: 10px;
//you can add more styles if you require.
}
第二种方法是像这样绑定css内联,但这不是可取的方法,通常仅在需要在页面上应用样式时使用。
<input name="keyword" type="text" Style="margin-left:10px; padding-left:10px;" placeholder="Job title, Keywords or Company Name"/>
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句