+ 2

What is the uses of :: in CSS?

5th Aug 2016, 5:55 AM
MD AQUEEL S
MD AQUEEL S - avatar
2 Answers
+ 4
The double colon replaced the single-colon notation for pseudo-elements in CSS3. This was an attempt from W3C to distinguish between pseudo-classes and pseudo-elements. example: p::first-line { color: red; } versus p:first-line { color: red; } Both segments of code will work. For backward compatibility, the single-colon syntax is acceptable for CSS2 and CSS1 pseudo-elements.
5th Aug 2016, 1:02 PM
wcountiss
wcountiss - avatar
+ 1
For pseudo-elements Ex.: ::before and ::after
29th Nov 2016, 12:32 AM
Beto Pereira
Beto Pereira - avatar