白云的透明度

来源:2-14 项目作业

Azathouth

2019-04-19 13:38:35

白云的透明度应该怎么设置,都设置成0.6一类的会出现这种情况?http://img.mukewang.com/climg/5cb95e930001c1ea02710193.jpg

/* cloud2 */
.cloud:nth-child(2){
position: absolute;
top: -5%;
right: 15%;
border: none;
background:rgba(255,255,255,0.6);
animation: cloud2 8s linear infinite normal;
transform: scale(0.7); 
}
.cloud:nth-child(2)::before{
content: "";
display: block;
width: 150px;
height: 150px;
background: rgba(255,255,255,0.6);
border-radius: 50%;
transform: translate(-61px,70px);
}
.cloud:nth-child(2)::after{
content: "";
display: block;
width: 300px;
height: 112px;
background: rgba(255,255,255,0.6);
border-radius: 50%;
transform: translate(-83px,-60px);
}


写回答

1回答

好帮手慕慕子

2019-04-19

同学你好, 这里可以适当的增加透明度,例如0.8或0.9,  另外伪类before和after也可以结合定位,让两个图形叠在div的上面,实现与白云的绘制

若还有疑惑可以继续在问答区提问, 我们会继续为你解答的

如果帮助到了你, 欢迎采纳

祝学习愉快~~~

0

0 学习 · 40143 问题

查看课程