CSS3实现可伸缩输入框
html文件:<input type="text">css文件:input{border: 1px solid #CCC;cursor: pointer;height: 30px;margin: 3px 0;text-indent:10px;position: relative;transition: width 400ms ea
·
html文件:
<input type="text">
css文件:
input{
border: 1px solid #CCC;
cursor: pointer;
height: 30px;
margin: 3px 0;
text-indent:10px;
position: relative;
transition: width 400ms ease, background 400ms ease, border-radius 400ms ease;
width: 100px;
font-size: 16px;
}
input:focus{
background-color: #fff;
border: 2px solid #c3c0ab;
border-radius:10px;
cursor: text;
outline: 0;
width: 230px;
}
实现效果:
更多推荐
已为社区贡献1条内容
所有评论(0)