Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

target css selector

p:target {
  background-color: gold;
}

/* Add a pseudo-element inside the target element */
p:target::before {
  font: 70% sans-serif;
  content: "►";
  color: limegreen;
  margin-right: .25em;
}

/* Style italic elements within the target element */
p:target i {
  color: red;
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #target #css #selector
ADD COMMENT
Topic
Name
6+9 =