<!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>Web开发者网络 - www.admin10000.com</title>
<style type="text/css">
.warp{ background:#eee url(back.jpg) no-repeat left top; width:440px; height:400px; border:1px solid #ccc;}
.content { width:180px; height:260px; margin:0px auto; padding:30px 30px; background:rgba(255, 255, 255, 0.6)!important;
filter:Alpha(opacity=60); background:#fff; /* 使用IE专属滤镜实现IE背景透明*/ }
.content p{ position:relative;} /*实现IE文字不透明*/
</style>
</head>
<body>
<p class="warp">
<p class="content"><p>Admin10000.com 是WEB开发者学习交流必备网站。Admin10000.com 是WEB开发者学习交流必备网站。Admin10000.com 是WEB开发者学习交流必备网站。Admin10000.com 是WEB开发者学习交流必备网站。Admin10000.com 是WEB开发者学习交流必备网站。Admin10000.com 是WEB开发者学习交流必备网站。</p></p>
</p>
</body>
</html>
以上代码在IE6.0+/FF3.0+/Opera10+/Chrome/Safari 均测试通过
以上就是CSS实现背景透明,文字不透明(兼容各浏览器)的详细内容,更多请关注php中文网其它相关文章!
![php中文网最新课程二维码](/static/images/article_wechat2021.jpg?1111)
声明:本文原创发布php中文网,转载请注明出处,感谢您的尊重!如有疑问,请联系admin@php.cn处理
- 上一篇:关于IE6下的CSS多类选择符
- 下一篇:教你如何用CSS创建打印页面
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论