gopi1410
gopi1410

Reputation: 6625

A customized input text box in html/html5

Actually, I want to implement a text box as shown in the figure:enter image description here

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?

Upvotes: 4

Views: 28285

Answers (2)

ijse
ijse

Reputation: 3035

Set <input> border be only bottom side. Here is the demo, just like your picture shows.

Upvotes: 0

Christian
Christian

Reputation: 19740

What have you tried so far? You pretty much answered 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

Upvotes: 12

Related Questions