这篇文章主要讲解了“css怎么实现背景半透明但文字不透明”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“css怎么实现背景半透明但文字不透明”吧!
具体代码:
<title>背景半透明但文字不透明</title>
<head>
<style>
body{background: #40ed90;}
#container {
color: #154BA0;
background: #ff0000;
filter: Alpha(Opacity=10, Style=0);
opacity: 0.10;
position: absolute;
height: 200px;
width:500px;
z-index:20;}
#text {
position: absolute;
height: 200px;
width:500px;
text-align:center;
z-index:30;}
</style>
</head>
<body>
<div id="container"></div>
<div id="text">背景半透明但文字不透明</div>
</body>
感谢各位的阅读,以上就是“css怎么实现背景半透明但文字不透明”的内容了,经过本文的学习后,相信大家对css怎么实现背景半透明但文字不透明这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是天达云,小编将为大家推送更多相关知识点的文章,欢迎关注!