javascript - I want to change text background color while selecting text that should also run in safari browser -


i want change text background color while selecting text should run in safari browser.... code should coded javascript , html. have code of that?

yeah have code not javascript . sorry - equally result yielded css (cascading style sheet) .

we make use of pseudo class called " selection ". code goes :

          ::selection {            color: red;            background: yellow;            } 

for more information : visit site

this css3 pseudo class , work in browsers supporting css3 , not supported in ie < 9 great way highlight selected text. in supported browsers.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -