I came across a blog-post, where ::
was used in their CSS code.
Here is part of their code:
::-webkit-scrollbar {
width: 10px;
}
The code is working fine for the scrollbar, but I could not find where this selector is defined. What does this officially mean
::
signifies a pseudo-element, as opposed to a pseudo-class:
. Pre-CSS3 they both used:
and support is a little scrappy for the::
syntax still.A pseudo-class filters existing elements.
a:link
means all<a>
s that are:link
.A pseudo-element is a new fake element.
div::after
create a "fake" element with<div>
but after its content.References