Home > Web Front-end > CSS Tutorial > Set translucent elements

Set translucent elements

php中世界最好的语言
Release: 2018-03-22 14:11:04
Original
1434 people have browsed it

This time I will bring you how to set translucent elements. What are the precautions for setting translucent elements? The following is a practical case, let’s take a look.

.opacity{ filter:alpha(opacity=50);

/* IE */ -moz-opacity:0.5;
/* Browsers that support opacity*/}

Used to set an element to be semi-transparent

.filter = "alpha(opacity=" + opacity + ")";    
/* IE */ .MozOpacity = (opacity / 100);                 
/* 老版Mozilla */ .KhtmlOpacity = (opacity / 100);               
/* 老版Safari */ .opacity = (opacity / 100);                    
/* 支持opacity的浏览器*/
Copy after login
Zoom on Windows platform

Picture

, may appear For image distortion, you can use IE's proprietary command:

img{-ms-interpolation-mode: bicubic;}
Copy after login
I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the PHP Chinese website! Recommended reading:

Four hiding methods in html+css


Detailed explanation of the use of linear-gradient


Detailed explanation of the use of border-image in css style

The above is the detailed content of Set translucent elements. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template