Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 76335

How to make an input text field like the one on the Tesla Cybertruck order website?

$
0
0

I want to make an input text field, like the one on https://www.tesla.com/en_gb/cybertruck/design#battery (it appears after clicking 'buy now') but I am unsure how to approach this.

I have tried adding border-radius but of course that only rounds the corners.

Below is my current code:

<style>
        body {
            background-color: black;
        }

        label {
            color: white;
        }

    input {
        width: 300px;
        height: 40px;
        border: solid white 1px;
        background: transparent;
        color: white;
        font-family: 'Consolas';
        font-size: 0.9em;
        font-weight: bold;
        padding: 10px 10px 10px 10px;
        transition: border 0.3s ease-in-out;
        box-sizing: border-box;
        outline-width: 0;
    border-radius: 10px 10px 10px 10px;
    border-style: none;
    border-width: 0 0 3px;
    padding: 3px 10px;
    }

    input:focus {
        border: solid white 3.5px;
    }
    </style>

<label>Test field</label>
<br>
<input type = "text">

I would like this to be responsive if possible, thanks in advance.


Viewing all articles
Browse latest Browse all 76335

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>