大佬教程收集整理的这篇文章主要介绍了css – 设置输入框背景,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
到目前为止,在我的代码中我有下面的代码,它没有显示 – >这样做的正确程序是什么?
我还要生成这个按钮的几个变体,它们是以下内容:
>按钮黑暗区域的十字架 – 我只是要使用< span>使用类标记并将图形设置为 – >这会是一个好方法吗?
>左边曲线后面的回形针图标 – >我打算像上面那样做 – >这会是一个好方法吗?
HTML:
<div class="innerTo"> <form action="#" method="get"> <label for="recipients">TO: </label> <input type="search" name="recipients" id="recipients" placeholder="Recipients Names"> </form> </div>
CSS:
.innerBar .innerTo{ width:200px; padding:5px 0 0 15px; display:block; float:left; } .innerBar .innerTo label{ margin:0 15px 0 0; font-size:14px; font-weight:bold; color:#666666; } .innerBar .innerTo input[type=search] { color: red; } .innerBar .recipients{ BACkground-image:url('../images/searchBGpng.png') no-repeat; width:192px; height:27px; }
<div class="input-container"> <input type="text" value="aaaaaaaaaaaaaaaaaa"/> </div> .input-container { BACkground: url(http://i.stack.imgur.com/0Vlc5.png) no-repeat; width:197px; height:28px; } .input-container input{ height:28px; line-height:28px;/*results in nice text vertical alignment*/ border:none; BACkground:transparent; padding:0 10px;/*don't start input text directly from the edge*/ width:148px;/*full width - grey on the side - 2*10px padding*/ }
如果您计划以不同的宽度重复使用它,您应该查找sliding doors technique.
以上是大佬教程为你收集整理的css – 设置输入框背景全部内容,希望文章能够帮你解决css – 设置输入框背景所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。