Home  >  Article  >  Web Front-end  >  What is the code for css not showing blue border?

What is the code for css not showing blue border?

藏色散人
藏色散人Original
2023-01-31 09:28:24951browse

The css code for not displaying blue borders is "img {border:0;onfocus="this.blur()"}"; where border is the abbreviation of the border attribute, which is used to specify the style and width of the element border. and color; the attributes that can be set are "border-width", "border-style" and "border-color" respectively.

What is the code for css not showing blue border?

The operating environment of this tutorial: Windows 10 system, CSS3 version, DELL G3 computer

What is the code for css not to display the blue border?

css Remove the blue border from the edge of the photo

In css, when writing code, the path to the photo is usually inserted, but when opening the website on the web page, , you will find that there is a blue border on the edge of the photo, which cannot be removed no matter how you refresh it. Now let’s talk about some cases:

The code to insert the picture is

<img src=""/>

which is the first in css Insert the code

divimg {border:0;}  

if it still doesn’t work and add

onfocus="this.blur()" 

The final result is:

img {border:0; onfocus="this.blur()"}

border Introduction:

border Yes Shorthand property for the border property.

CSS border property is used to specify the style, width and color of the element border.

The properties that can be set are (in order): border-width, border-style and border-color.

You can also set only one value. For example, border: #FF0000; is correct, and other values ​​will be set to the initial values ​​of the corresponding attributes.

Syntax format

The border attribute can be specified using one, two, or three of the values ​​listed below. The order of the values ​​does not matter:

/* 边框样式 */
border: solid;
/* 边框宽度 | 边框样式 */
border: 2px dotted;
/* 边框样式 | 边框颜色 */
border: outset #f33;
/* 边框宽度 | 边框样式 | 边框颜色 */
border: medium dashed green;
/* 全局值 */
border: inherit;
border: initial;
border: unset;

Note: If the border's style is undefined, it will not be visible. This is because styles default to none.

Recommended learning: "css video tutorial"

The above is the detailed content of What is the code for css not showing blue border?. 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