CSS-透明度设置

css 复制代码
.transparent_class {
      filter:alpha(opacity=50);
      -moz-opacity:0.5;
      -khtml-opacity: 0.5;
      opacity: 0.5;
}

Here is what each of those CSS properties is for:

  • opacity: 0.5; This is the "most important" one because it is the current standard in CSS. This will work in most versions of Firefox, Safari, and Opera. This would be all you need if all browsers supported current standards. Which, of course, they don't.
  • filter:alpha(opacity=50); This one you need for IE.
    -moz-opacity:0.5; You need this one to support way old school versions of the Mozilla browsers like Netscape Navigator.
  • -khtml-opacity: 0.5; This is for way old versions of Safari (1.x) when the rendering engine it was using was still referred to as KTHML, as opposed to the current WebKit .
相关推荐
GanGuaGua20 分钟前
CSS:盒子模型
开发语言·前端·css·html
星空寻流年5 小时前
css3伸缩盒模型第二章(侧轴相关)
javascript·css·css3
GalenWu6 小时前
对象转换为 JSON 字符串(或反向解析)
前端·javascript·微信小程序·json
GUIQU.6 小时前
【Vue】微前端架构与Vue(qiankun、Micro-App)
前端·vue.js·架构
数据潜水员7 小时前
插槽、生命周期
前端·javascript·vue.js
2501_907136827 小时前
CSS 学习与工程化实践指南
css
2401_837088507 小时前
CSS vertical-align
前端·html
优雅永不过时·7 小时前
实现一个漂亮的Three.js 扫光地面 圆形贴图扫光
前端·javascript·智慧城市·three.js·贴图·shader
CodeCraft Studio8 小时前
报表控件stimulsoft教程:使用 JoinType 关系参数创建仪表盘
前端·ui
春天姐姐9 小时前
vue知识点总结 依赖注入 动态组件 异步加载
前端·javascript·vue.js