Div can input content without using input as an input box to block the automatic input style

Div can input content without using input as an input box to block the automatic input style
Today I designed a dynamic window style for publishing, and found that the style automatically added by the browser when the mouse clicks on the input is inconsistent with the overall style of the website. Although this intelligent function of the browser is very advanced, it sometimes inevitably affects the overall consistency of the design.

Then I thought about whether it would be possible to not use input as an input box, so I changed it to

Copy code
The code is as follows:

<div class="content" contenteditable="true"></div>

I thought I could avoid the "smart" function of the browser, but the browser was too smart and the effect was exactly the same. I could only go to Baidu, and later I found that my CSS was not well prepared. Poor me (self-examination in progress)

There is such a property in css

Copy code
The code is as follows:

.content{outline:none;}

And this is something that CSS3 has already had, but I...

<<:  About if contains comma expression in JavaScript

>>:  mysql startup failure problem and scenario analysis

Blog    

Recommend

setup+ref+reactive implements vue3 responsiveness

Setup is used to write combined APIs. The interna...

How to use nginx to simulate canary release

This article introduces blue-green deployment and...

Detailed explanation of Docker compose orchestration tool

Docker Compose Docker Compose is a tool for defin...

Detailed explanation of MySQL monitoring tool mysql-monitor

1. Overview mysql-monitor MYSQL monitoring tool, ...

In-depth explanation of InnoDB locks in MySQL technology

Table of contents Preface 1. What is a lock? 2. L...

Detailed usage of Vue more filter widget

This article example shares the implementation me...

Installation steps of docker-ce on Raspberry Pi 4b ubuntu19 server

The Raspberry Pi model is 4b, 1G RAM. The system ...

Vue3.0 adaptive operation of computers with different resolutions

First we need to install some dependencies npm i ...

Sample code for implementing Google third-party login in Vue

Table of contents 1. Developer Platform Configura...

JavaScript to achieve window display effect

This article shares the specific code of JavaScri...

Tutorial on Migrating Projects from MYSQL to MARIADB

Prepare the database (MySQL). If you already have...