Skip to content

Floating labels #40966

Answered by ynng3
viniciusjdebiasi asked this question in Q&A
Oct 22, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

As an example, let's assume we want to apply a transparent background to floating labels and write the code accordingly.

Access the element using the :after pseudo-selector as shown in the code below.

.form-floating>.form-control:focus~label::after { background-color: transparent; }

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@viniciusjdebiasi
Comment options

Answer selected by viniciusjdebiasi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants