Home  >  Article  >  Web Front-end  >  How to prevent input border from displaying in html page?

How to prevent input border from displaying in html page?

藏色散人
藏色散人Original
2018-08-15 14:56:1813998browse

When we design the form registration page within the website, we will find that when the mouse cursor is placed in the input box to enter a value, a blue border line will appear. Even if you don't set the input style, there will be. This is because in HTML, input tags have border and background color attributes by default. If we don't need this border display, we want to remove the input border or hide the input box. How should we operate it?

The following will give you a detailed introduction to the relevant knowledge about modifying the input border, that is, removing and hiding the border.

1. When the input box is not clicked, the border is not displayed:

 border:none;

2. When the input box is clicked and the value is ready to be entered, the border is not displayed:

input{  
border:none;
  width:200px;  height:80px;
  box-radius:25%;
  outline:medium;
  text-align:center;
  }

Note: Use outline:medium in the style; when you click the input box, there will be no border line displayed.

outline (outline) is a line drawn around an element, located outside the edge of the border, which can highlight the element. Contours do not take up space and are not necessarily rectangular.

outline shorthand property sets all outline properties in one declaration.

Then this article gives a detailed introduction on how to remove the input border. I hope it will be helpful to friends in need.



The above is the detailed content of How to prevent input border from displaying in html page?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn