Get the App
SLTechnology News&Howtos  ›  Development  › 

How to set the transparency of a picture by html

Shulou Source: shulou.com Published: 2022-06-03 07:08:13 11月06日 Update

This article will explain in detail how to set the transparency of pictures in html. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

Html picture set transparency method: 1, in the img element using the style attribute to set "opacity: transparency value;" style; 2, in the img element using the style attribute to set "filter:opacity (transparency value);" style.

The operating environment of this tutorial: windows7 system, CSS3&&HTML5 version, Dell G3 computer.

Html Picture

In HTML, you can use the img element to embed an image into a web page.

Please note that technically speaking

The tag does not insert the image into the page, but links the image from the page.

The tag creates a placeholder for the referenced image.

Html pictures set transparency

Method 1: use the style attribute in the img element to set the "opacity: transparency value;" style

Method 2: use the style attribute to set the "filter:opacity (transparency value);" style in the img element

This is the end of this article on "how to set the transparency of pictures in html". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Tags: Transparency pictures elements images attributes styles methods articles web pages more tags good practical winding content technology tutorials articles environment computer Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi macOS Microsoft OPPO Reno MariaDB