html / html5中的自定义输入文本框 [英] A customized input text box in html/html5

查看:131
本文介绍了html / html5中的自定义输入文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上,我要实现一个文本框,如图所示:

Actually I want to implement a text box like shown in the figure:

我希望用户能够在所需空间中输入号码。注意,它将是透明的,所以背景是可见的。一个涉及html5 canvas的解决方案也会很好。

I want that the user should be able to enter the number in the required space. Note that it would be transparent so that the background is visible. A solution involving html5 canvas would also be good.

那么,是否可以这样做呢?如果是,如何?

So , is it possible to do this? If so, how?

推荐答案

到目前为止,你尝试了什么?你几乎回答了你自己的问题,使输入有透明的背景。

What have you tried so far? You pretty much answerred your own question, make the input have a transparent background.

input {
    border: 0;
    outline: 0;
    background: transparent;
    border-bottom: 2px solid black;
    width: 20px;
}

jsFiddle:http://jsfiddle.net/9wdUp/1/

jsFiddle: http://jsfiddle.net/9wdUp/1/

这篇关于html / html5中的自定义输入文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆