html - Custom style for input with CSS -
i have design input this:
but style, can't that.
my css:
input.custom[type=text]{ border: none; border-bottom: 1px solid #00cccb; } .custom::-webkit-input-placeholder { color: #727272; } .custom:-moz-placeholder { /* firefox 18- */ color: #727272; } .custom::-moz-placeholder { /* firefox 19+ */ color: #727272; } .custom:-ms-input-placeholder { color: #727272; }
my html:
<input type="text" class="custom" placeholder="text goes here"/>
results:
how can style input bottom border and tiny left, right borders, in design?
you can wrap input
in span
, style :before
, :after
on accordingly. need use span
input
s replaced elements, without psuedo elements can style.
input { border: none; border-bottom: 1px solid #00cccb; padding: 0 10px; color: #727272; font-size: 20px; vertical-align: baseline; } input:focus { outline: none; } span { position: relative; display: inline-block; } span:before, span:after { content: ''; display: block; bottom: 0; height: 15px; border-left: 1px solid #00cccb; position: absolute; } span:after { right: 0; }
<span><input /></span>
Comments
Post a Comment