如何使用CSS为discord创建透明背景?

问题描述 投票:0回答:2

我是第一年编程,只是学习Java,这就是为什么我完全失去CSS并需要帮助。我想编辑这段代码(不是我的)

===== CUSTOMIZABLE COLORS =====
:root { 
main-color: #057F95;
hover-color: #045B6B;
}


===== CUSTOMIZABLE IMAGES =====
IMPORTANT: EVERY URL MUST BE HTTPS:// IN ORDER TO WORK IN DISCORD
RECOMMENDATIONS: EVERY URL AT THE BOTTOM SHOULD BE THE SAME TO MAKE THE
tHEM MATCH. (YOUR CHOICE)
/*Change the url in .app to change the background behind chat */
.app { background-image: url("https://imgur.com/RG03PyX.png") !important;
background-size: cover !important; }

/*Change the url in .callout-backdrop to change the background when modal pop outs happen */

.callout-backdrop { background-color: black !important; background-image:     url("https://imgur.com/RG03PyX.png") !important; -webkit-transition: 0.3s all     ease; -o-transition: 0.3s all ease; -moz-transition: 0.3s all ease; transition:     0.3s all ease; background-size: cover !important; -webkit-filter:     brightness(75%); }

/*Change the urls below to change the background of a profile modal pop up     */

.user-popout:before {
    background-image: url("https://imgur.com/RG03PyX.png") !important;
    content: "";position: absolute;left: 0;top: 0;height: 100%;width:     100%;z-index: -1;background-position: 50% 50%;-webkit-filter: blur(3px);-webkit-    transform: scale(1.05);transform: scale(1.05);}

#user-profile-modal .header:before {
    background: -webkit-linear-gradient(top, rgba(0, 0, 0, .3), rgba(0, 0,     0, 0.5)), url("https://imgur.com/RG03PyX.png") !important;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .3), rgba(0, 0, 0,     0.5)), url("https://imgur.com/RG03PyX.png") !important;
    content: "";position: absolute;left: 0;top: 0;width: 100%;height:     100%;z-index: -1;background-position: 50% 50%;background-size: cover     !important;-webkit-filter: blur(3px);-webkit-transform: scale(1.1);transform:     scale(1.1);}

我尝试不同的东西(颜色:透明,透明度:真,rgba(0,0,0,0.1),可见性:隐藏,不透明度:0.5,制作透明背景和其他一些,但没有一个工作。我希望你能找到解决我的问题。

css background transparent discord
2个回答
0
投票

color是元素中文本颜色的属性。 background: transparent是你要找的人。


0
投票

你想要使用background-color: rgba(255,0,0,0.3),如果你想要透明的红色等。

© www.soinside.com 2019 - 2024. All rights reserved.