Example code for CSS pseudo-classes to modify input selection style

Example code for CSS pseudo-classes to modify input selection style

Note: This table is quoted from the W3School tutorial

Classification and function of pseudo-elements:

Let's take a look at the sample code of CSS pseudo-class to modify the input selection style. The code is as follows:

The after pseudo-class and font symbols are mainly used.

input{
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: inline-block;
}
input:after{
    content: "";
    font-size: 18px;
    display: inline-block;
    width: 14px;
    height: 14px;
    line-height: 14px;
    text-align: center;
    border: 1px solid #666fff;
    vertical-align: bottom;
}
input:checked:after{
    content: "\2714";
}

The effect is as follows:

This is the end of this article about using CSS pseudo-class to modify input selection style. For more relevant CSS input selection style content, please search 123WORDPRESS.COM’s previous articles or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future!

<<:  Detailed process of installing the docker plugin in IntelliJ IDEA (2018 version)

>>:  JS ES new features template string

Recommend

VMWare Linux MySQL 5.7.13 installation and configuration tutorial

This article shares with you the tutorial of inst...

Vue network request scheme native network request and js network request library

1. Native network request 1. XMLHttpRequest (w3c ...

Solve the problem of docker's tls (ssl) certificate expiration

Problem phenomenon: [root@localhost ~]# docker im...

Vue implements internationalization of web page language switching

1. Basic steps 1: Install yarn add vue-i18n Creat...

mysql installer web community 5.7.21.0.msi installation graphic tutorial

This article example shares the specific code for...

Docker Compose one-click ELK deployment method implementation

Install Filebeat has completely replaced Logstash...

JavaScript realizes the drag effect of modal box

Here is a case of modal box dragging. The functio...

CentOS 7 method to modify the gateway and configure the IP example

When installing the centos7 version, choose to co...

12 types of component communications in Vue2

Table of contents 1. props 2..sync 3.v-model 4.re...

CSS uses BEM naming convention practice

When you see a class, what information do you wan...

This article teaches you how to import CSS like JS modules

Table of contents Preface What are constructible ...

HTML table tag tutorial (19): row tag

The attributes of the <TR> tag are used to ...

Detailed steps to start the Django project with nginx+uwsgi

When we develop a web project with Django, the te...