Use CSS selection to change the background color of the reversed text!
In computer operations, there are often inverse selection. The system usually displays complementary colors based on the color of the selected area. However, when the default Windows text is selected, the background is blue, and the foreground color is white. if the background is dark, the text is blue and the background is white. As shown in:
Default style after invert Selection
Can you change the default color? Maybe many people are not very concerned about this problem, or you may have seen this effect before, but ignored it.
PPK provides the following CSS:Code:
:-Moz-selection {/* For Firefox */
Background: # cc0000;
Color: # FFF;
}
: Selection {
Background: # cc0000;
Color: # FFF;
}
Code:-moz-selection {/* code is the tag selector, which can be changed to P or span */
Background: #333333;
}
Code: selection {
Background: #333333;
}
The code above shows that you can define different background colors for different containers.