就一句话
background: rgba(0, 0, 0, .2);
???body { ???????background-color: pink; ???} ???div { ???????width: 200px; ???????height: 200px; ???????/*background-color: #000;*/ ???????color: #fff; ???????background: rgba(0, 0, 0, .2); /* red ?green blue ?alpha ?0~1 ?*/ ???} ???</style></head><body> ???<div> ???????我是文字内容 ???</div></body>
CSS - 背景半透明
原文地址:https://www.cnblogs.com/allen2333/p/9004575.html