Frontend Canteen
Published in

Frontend Canteen

An Advanced CSS Interview Question: Implement if-else in CSS

One of my friends recently came across a funny CSS interview question during an interview. When I first saw the question, I thought it was a usual question. However, after careful research, I discovered the interesting part of this question.

The interview question: please implement the following CSS effect.

There are some numbers on the page showing the number of articles reads. If the number is less than 100, then the color of the number is gray. If the number is greater than or equal to 100, then the…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store