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 .
相关推荐
pan_junbiao6 小时前
Go 语言基本数据类型
java·前端·golang
ZhengEnCi13 小时前
前端日志和后端日志怎么记:分级、JSON 格式、按天分文件与保留策略
前端·后端·python
kyriewen14 小时前
我给 61 个前端库排了两次名,最多差了 46 位
前端·javascript·程序员
亲亲小宝宝鸭15 小时前
Cesium启动:TLE数据是如何变成轨迹线的
前端·cesium
阿里云云原生15 小时前
对话即构建,在 AgentCore 构建 Agent 就是这么简单
前端·agent
夕水16 小时前
我给我的诗写了个后台,顺手写了 一个组件库ew-solid-ui
前端·javascript·typescript
狗头大军之江苏分军16 小时前
前端转行干能干什么?我转行试了下(被迫)
前端·后端
孟陬16 小时前
Foobar 技术周刊#2:约会已死?用户急剧下滑,约会App大概率会弱化约会属性转向轻陪伴。我有个建议:
前端·后端·rust
parade岁月17 小时前
VTable Guild 3.0.0 发布,面向 Vue 3 的 ProTable 式业务表格
前端
xurileidian18 小时前
第 17 篇 · 边玩边学Python · for 遍历 enumerate 与 zip
java·前端·python