Please left-click and drag this text (check it). The color you see is blue, would I like to change this color to dark green using Javascript or HTML / CSS?
Browser support is limited.
::selection { background: #ffb7b7; /* Safari */ } ::-moz-selection { background: #ffb7b7; /* Firefox */ }
Example .
Further reading .
http://snipplr.com/view/4285/change-color-of-selected-text/
Its CSS3 and only Safari and Firefox support this, and both in different ways.
Source: https://habr.com/ru/post/1794351/More articles:How to use calendar in iPhone app? - iosВиджет запускает диалог по щелчку - androidCreating a custom button in a ListView in ASP.NET - asp.netMysql retrieves polygonal data - phpProgram Dependency Charts (PDG) - compiler-constructionHow to Transfer Data from a SQL Server Database to an Oracle Database - unixAS3 XML object that does not throw an exception if invalid data is specified? - stringIs it possible to manually set the ID of newlines using RedBean PHP? - phpIs there a way to set custom language strings for a ReCaptcha ASP.Net user control? - asp.netLogic and Code Help - ruby-on-railsAll Articles