如何在 html 和 css 中显示背景色(有光泽)
how to shine the background color (glossy)in htlml and css
我使用 angular 创建了仪表板,并使用线性渐变设置了黑色和灰色的背景颜色,但看起来不太好。
我想让我的仪表板背景像黑色一样闪亮。
dashboard.component.css
#bgcolor {
background-color:lightgray;
background-image: linear-gradient( black , grey);
}
任何人都可以帮助我如何使背景颜色变黑
body{
height:100vh;
}
.radial-gradient {
background-repeat:no-repeat;
background-size: 100% 100%;
background-image: radial-gradient(farthest-corner at 40px 40px,
#111 20%, #333 100%,#ddd 100%);
}
.text-glow{
color: white;
text-shadow: 0 1px 0 #ccc,
0 2px 0 #c9c9c9,
0 3px 0 #bbb,
0 4px 0 #b9b9b9,
0 5px 0 #aaa,
0 6px 1px rgba(0,0,0,.1),
0 0 5px rgba(0,0,0,.1),
0 1px 3px rgba(0,0,0,.3),
0 3px 5px rgba(0,0,0,.2),
0 5px 10px rgba(0,0,0,.25),
0 10px 10px rgba(0,0,0,.2),
0 20px 20px rgba(0,0,0,.15);
}
.t2{
color: white;
text-shadow: 0 0 2px #fff, 0 0 3px #ff4da6, 0 0 4px #ff4da6, 0 0 5px #ff4da6, 0 0 6px #ff4da6, 0 0 7px #ff4da6, 0 0 8px #ff4da6;
}
<body class="radial-gradient">
<center>
<h1 class="text-glow">Is this Okay ? </h1>
<h1 class="t2">ddind</h2>
</body>
我使用 angular 创建了仪表板,并使用线性渐变设置了黑色和灰色的背景颜色,但看起来不太好。
我想让我的仪表板背景像黑色一样闪亮。
dashboard.component.css
#bgcolor {
background-color:lightgray;
background-image: linear-gradient( black , grey);
}
任何人都可以帮助我如何使背景颜色变黑
body{
height:100vh;
}
.radial-gradient {
background-repeat:no-repeat;
background-size: 100% 100%;
background-image: radial-gradient(farthest-corner at 40px 40px,
#111 20%, #333 100%,#ddd 100%);
}
.text-glow{
color: white;
text-shadow: 0 1px 0 #ccc,
0 2px 0 #c9c9c9,
0 3px 0 #bbb,
0 4px 0 #b9b9b9,
0 5px 0 #aaa,
0 6px 1px rgba(0,0,0,.1),
0 0 5px rgba(0,0,0,.1),
0 1px 3px rgba(0,0,0,.3),
0 3px 5px rgba(0,0,0,.2),
0 5px 10px rgba(0,0,0,.25),
0 10px 10px rgba(0,0,0,.2),
0 20px 20px rgba(0,0,0,.15);
}
.t2{
color: white;
text-shadow: 0 0 2px #fff, 0 0 3px #ff4da6, 0 0 4px #ff4da6, 0 0 5px #ff4da6, 0 0 6px #ff4da6, 0 0 7px #ff4da6, 0 0 8px #ff4da6;
}
<body class="radial-gradient">
<center>
<h1 class="text-glow">Is this Okay ? </h1>
<h1 class="t2">ddind</h2>
</body>