当前第2页 返回上一页
代码实例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | <!DOCTYPE html>
<html>
<head>
<meta charset= "UTF-8" >
<title>rgba()</title>
<style>
.demo{
width: 350px;
height: 300px;
margin: 50px auto;
}
.demo *{
width: 120px;
height: 120px;
margin: 10px;
float: left;
}
.demo1{
background:rgba(255,0,0,1);
}
.demo2{
background:rgba(255,0,0,0.5);
}
</style>
</head>
<body>
<div class = "demo" >
<div class = "demo1" >背景色不透明,文字不透明!</div>
<div class = "demo2" >背景色半透明,文字不透明!</div>
</div>
</body>
</html>
|
效果图:

相关教程推荐:CSS视频教程
以上就是css如何设置不透明的详细内容,更多文章请关注木庄网络博客!
返回前面的内容
相关阅读 >>
css居中对齐怎么设置
css怎么给按钮加上超链接
css如何制作饼状图
css :not()选择器怎么用
css float属性怎么用
css如何禁止复制
css中有哪些字体属性
html5 canvas实现中奖转盘的实例代码
带你玩转css中各种方向小箭头
html5的classlist属性操作css类的使用详解
更多相关阅读请进入《css》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » css如何设置不透明