Home
Sign Up
Sign In
V2EX
›
问与答
请教一个 css 问题
zxCoder
·
Nov 7, 2021
· 1452 views
This topic created in 1845 days ago, the information mentioned may be changed or developed.
有一个 input ,然后前面有一个 icon ,css 能实现,input focus 的时候,icon 的样式也修改吗
input
CSS
icon
Focus
2 replies
•
2021-11-07 20:31:58 +08:00
xell
Nov 7, 2021
1
1
+ 或者 ~ 选择器就好了,例如
<input type="text" id="text"><icon class="icon">
#text:focus ~ .icon { ... }
iNaru
Nov 7, 2021
1
2
参考 :focus-within
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
1132 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 31ms ·
UTC 23:23
·
PVG 07:23
·
LAX 15:23
·
JFK 18:23
♥ Do have faith in what you're doing.
❯