Home  >  Article  >  Web Front-end  >  How to set transparency to background image in html

How to set transparency to background image in html

青灯夜游
青灯夜游Original
2022-01-21 12:00:1757302browse

htmlHow to set the transparency of the background image: 1. Use the opacity attribute to add the "opacity: transparency value;" style to the element that sets the background image; 2. Use the filter attribute to set the background image. Just add the "filter: opacity (transparency value);" style to the element.

How to set transparency to background image in html

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

htmlSet the transparency of the background image

1. Use the opacity attribute



	
		
	

	
		
背景图片
背景图片

How to set transparency to background image in html

2. Use the filter attribute



	
		
	

	
		
背景图片
背景图片

How to set transparency to background image in html

##Related recommendations: "

html video tutorial

The above is the detailed content of How to set transparency to background image in html. 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