简体   繁体   中英

Is it possible to set the selection colour of html form input text box?

I want to be able to specify the highlight colour that appears around an input text box when a user selects it. By default (on a Mac) this always seems to be a light blue colour as per the screenshots below.

Does anyone know if this is possible and if so how?

Unselected:

在此处输入图片说明

Selected:

在此处输入图片说明

use

input:focus {
  border:/** your style definitions **/
  outline: /** **/
  box-shadow: /** **/
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM