azl397985856 / fe-interview

宇宙最强的前端面试指南 (https://lucifer.ren/fe-interview)
Apache License 2.0
2.83k stars 260 forks source link

【每日一题】- 2020-05-21 - css复合选择器 #130

Closed azl397985856 closed 4 years ago

azl397985856 commented 4 years ago

假设浏览器不支持复合选择器, 而只支持单一选择器。 比如id选择器,类选择器,属性选择器等。

问: 如何实现复合选择器?比如 a[class=abc] 就是选择所有class为abc的a标签,如何用代码实现之?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.