css 背景透明 文字不透明的方法
html代码如下:
复制代码
1
2
3
4<div class="prizeNum"> <p class="prizeNameTitle">name</p> </div>
css 代码如下:
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15.prizeNum{ color: #fff; font-size: 12px; background-color: rgba(0,0,0,0.5); width: 67%; height: 45px; border-radius: 40px; position: absolute; top: 65%; left: 50%; transform: translate(-50%); text-align: center; line-height: 25px; }
background-color: rgba(0,0,0,0.5);
想要修改透明背景的颜色 修改rgb的值就可以了 最后一个是透明度
最后
以上就是重要机器猫最近收集整理的关于css 背景透明,文字不透明写法的全部内容,更多相关css内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复