Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

selection css

/* Make selected text gold on a red background */
::selection {
  color: gold;
  background-color: red;
}

/* Make selected text in a paragraph white on a blue background */
p::selection {
  color: white;
  background-color: blue;
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #selection #css
ADD COMMENT
Topic
Name
6+7 =