top of page

TEXT SELECTION COLOR

Global Style

<style>
::-moz-selection { /* Code for Firefox */
  color: red;
  background: #ffff00a8;
}

::selection {
  color: red;
  background: #ffff00a8;
}
</style>

Global Style + Special Style for Heading (H1) 

<style>
::-moz-selection { /* Code for Firefox */
  color: red;
  background: #ffff00a8;
}

::selection {
  color: red;
  background: #ffff00a8;
}
/* Heading Style */
h1::-moz-selection, h1>span::-moz-selection { 
  color: blue;
  background: transparent;
}

h1::selection, h1>span::selection {
  color: blue;
  background: transparent;
}
</style>

bottom of page