Answers for "select tag in html with css"

CSS
1

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;
}
Posted by: Guest on October-10-2021

Browse Popular Code Answers by Language