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

Detailed explanation of mysql basic operation statement commands

1. Connect to MySQL Format: mysql -h host address...

Web Design Tips: Simple Rules for Page Layout

Repetition: Repeat certain page design styles thr...

Install MySQL 5.7.18 using rpm package under CentOS 7

I have been using MySQL recently. The article mys...

React+axios implements github search user function (sample code)

load Request Success Request failed Click cmd and...

CSS Standard: vertical-align property

<br />Original text: http://www.mikkolee.com...

Use of Linux usermod command

1. Command Introduction The usermod (user modify)...

How to create dynamic QML objects in JavaScript

1. Dynamically create objects There are two ways ...

Native js implementation of slider interval component

This article example shares the specific code of ...

How to run Python script on Docker

First create a specific project directory for you...

mysql5.5.28 installation tutorial is super detailed!

mysql5.5.28 installation tutorial for your refere...

Summary of principles for writing HTML pages for emails

Since HTML email is not an independent HOST page o...

Centos6.9 installation Mysql5.7.18 step record

Installation sequence rpm -ivh mysql-community-co...

Tutorial on installing PHP on centos via yum

First, let me introduce how to install PHP on Cen...

HTML table cross-row and cross-column operations (rowspan, colspan)

Generally, the colspan attribute of the <td>...