JSFiddle - React, Tailwind, and code Playground
by Mdot
HTML
<fieldset>
<legend>E-Mail</legend>
<input id="email" type="email">
</fieldset>
CSS
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
body {
background-image: url(https://picsum.photos/1000/600);
background-repeat: no-repeat;
background-size: cover;
font-family: sans-serif;
padding: 10px;
}
fieldset {
border: 2px solid magenta;
border-radius: 5px;
padding: 0;
position: relative;
}
legend {
color: white;
font-size: 16px;
margin-left: 15px;
padding: 0 5px;
}
input {
background-color: transparent;
border: none;
color: white;
display: block;
font-size: 20px;
outline: none;
padding: 15px 22px; /* 22px to account for fieldset border */
width: 100%;
}
input:focus {
}