DIV background semi-transparent text non-translucent style

DIV background semi-transparent text non-translucent style
DIV background is semi-transparent, but the words in DIV are not semi-transparent

Copy code
The code is as follows:

<body bgcolor="#336699">
<div style="filter:alpha(opacity=50);background:#ffffff;width:600;"><span style="color:yellow">

The layer background is semi-transparent, and the font color is also semi-transparent

Copy code
The code is as follows:

</span></div>
<div style="filter:alpha(opacity=50);background:#ffffff;width:600"><span style="position:relative;color:yellow">The layer background is semi-transparent, and the font color is not semi-transparent</span></div>

*******The layer with filter must have width attribute, otherwise the filter will be invalid. ********

We can use CSS style filters to set filter effects on some HTML tags.

example:

Black and white photo filter: gray;
X-ray photofilter: Xray;
Wind blur filter: blur(add=true,direction=45,strength=30);
Sine wave filter: Wave(Add=0, Freq=60, LightStrength=1, Phase=0, Strength=3);
Translucent effect filter: Alpha(Opacity=50);
Linear transparent filter: Alpha(Opacity=0, FinishOpacity=100, Style=1, StartX=0, StartY=0, FinishX=100, FinishY=140);
Radiation transparency filter: Alpha(Opacity=10, FinishOpacity=100, Style=2, StartX=30, StartY=30, FinishX=200, FinishY=200);
White transparent filter: Chroma(Color=#FFFFFF);
Reduce color filter: grays;
Negative effect filter: invert;
Flip left and right filter: fliph;
Vertical flip filter: flipv;
Projection effect filter:progid:dXImageTransform.Microsoft.DropShadow(color=#cccccc,offX=5,offY=5,positives=true);
Mosaic filter:progid:dXImageTransform.Microsoft.Pixelate(maxsquare=3);
Glow effect filter:progid:dXImageTransform.Microsoft.Glow(color=#cccccc,Strength=5);
Soft edge effect filter:alpha(opacity=100, finishOpacity=0,style=2

<<:  Best Practices Guide for Storing Dates in MySQL

>>:  Vue+webrtc (Tencent Cloud) practice of implementing live broadcast function

Recommend

Sample code for implementing rolling updates of services using Docker Swarm

1. What is Docker Swarm? Docker Swarm is a cluste...

How to import and export Docker images

This article introduces the import and export of ...

How to redirect to https through nginx load balancing

Copy the certificate and key on the web scp -rp -...

Detailed explanation of javascript knowledge points

Table of contents 1. Basic Introduction to JavaSc...

Linux IO multiplexing epoll network programming

Preface This chapter uses basic Linux functions a...

Several solutions for forgetting the MySQL password

Solution 1 Completely uninstall and delete all da...

Blog Design Web Design Debut

The first web page I designed is as follows: I ha...

Mysql multi-condition query statement with And keyword

MySQL multi-condition query with AND keyword. In ...

mysql data insert, update and delete details

Table of contents 1. Insert 2. Update 3. Delete 1...

MySQL DATE_ADD and ADDDATE functions add a specified time interval to a date

MySQL DATE_ADD(date,INTERVAL expr type) and ADDDA...

Screen command and usage in Linux

Screen Introduction Screen is a free software dev...

Detailed explanation of MySQL InnoDB secondary index sorting example

Sorting Problem I recently read "45 Lectures...

How to add vim implementation code examples in power shell

1. Go to Vim's official website to download t...