zoukankan
html css js c++ java
魔哥Css:背景色透明,内容不透明之终极方法!兼容(不支持ie6)。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>小魔出品</title> <style> body {background:url(http://www.google.com.hk/intl/zh-CN/images/logo_cn.png) 0 0 repeat;} * {margin:0;padding:0;} .Boxer {600px;height:400px;overflow:hidden;margin:0 auto;border:6px solid red;} .Opacity { height:400px; background-color:rgba(0,0,0,0.5); /*标准浏览器 只需这句*/ background-color:#000\9; /*IE 系列*/ filter:alpha(opacity=50); /*IE 系列*/ /* 作为透明背景的层,不可以有 position 属性,不知为何。。。 。 background-color:rgba(0,0,0,0.5) 这句,IE6貌似能读懂一小部分,我艹了。所以只能将background-color:#000 写在其后,然后加个IE的专有Hack。 不信可以写一个试试看 background-color:#000;background-color:rgba(0,0,0,0.5);filter:alpha(opacity=50); IE6会让你蛋疼的! */ } .BoxerInner {position:relative; /*IE 系列*/ text-align:center;font-size:24px;font-weight:700;color:yellow;} </style> </head> <body> <p style="font-size:60px;color:#000;text-align:center;padding:20px;font-weight:700;">Css:背景色透明,内容不透明之终极方法!兼容,终极。</p> <div class="Boxer"> <div class="Opacity"> <div class="BoxerInner">BoxerInner</div> </div> </div> </body> </html>
运行代码
查看全文
相关阅读:
2020 ICPC 沈阳站 M. United in Stormwind
[笔记] 中世纪反演魔法
[模板] 多项式工业
HDU 1187 Big Event in HDU
洛谷 P2000 拯救世界
HDU 1085 Holding Bin-Laden Captive!
HDU 1028 Ignatius and the Princess III
性能测试——jmeter接口测试复习——请求元件之配置元件——参数化——txt与csv
性能测试——jmeter接口测试复习——请求元件之用户自定义变量——即参数化
性能测试——jmeter接口测试复习——断言之响应断言——放在某个http请求下面,用来判断返回code、header、message中是否包含预期的值
原文地址:https://www.cnblogs.com/jikey/p/1857217.html
最新文章
Java8 Map computeIfAbsent方法说明
java枚举类型的实现原理
springboot源码篇-springboot 数据库配置源码解析
springboot源码篇-springboot web应用源码分析
springboot源码篇-springboot外化配置源码分析
springboot源码篇-springboot构造流程源码分析
springboot源码篇-springboot运行流程源码分析
springboot源码篇-springboot核心运行原理
springboot源码篇-阅读代码前准备
将博客搬至CSDN
热门文章
JVM字节码-Android字节码与APM
JVM字节码-全链路分布式跟踪与APM
[萌新向] 基础dp 笔记
uoj37 【清华集训2014】主旋律 做题心得
神秘数据结构:笛卡尔树
分块 笔记
虚树 笔记
分治 笔记
后缀三姐妹 笔记
[模板] 类欧几里得算法
Copyright © 2011-2022 走看看