The original poster, if you use select to write, there is no way to set this effect. It is recommended that the original poster use ul li to write. I am a novice. I wrote it briefly. There are many things that need to be changed. If there is any need to be corrected, I hope you can point it out~ I wrote it simply. Many places have not been processed. For example, if you want to truly simulate a select box, the right side of the input is best. Add an arrow and it can be used as a switch.
PS: This is my first time pasting a code snippet here, so I don’t know what the format looks like. . . Just take a look.
.selected{border-bottom:2px solid rgb(255,203,107)}
The original poster, if you use select to write, there is no way to set this effect. It is recommended that the original poster use ul li to write. I am a novice. I wrote it briefly. There are many things that need to be changed. If there is any need to be corrected, I hope you can point it out~ I wrote it simply. Many places have not been processed. For example, if you want to truly simulate a select box, the right side of the input is best. Add an arrow and it can be used as a switch.
PS: This is my first time pasting a code snippet here, so I don’t know what the format looks like. . . Just take a look.
html code:
css code:
js code: