简体   繁体   English

半径向渐变 CSS

[英]Half Radial Gradient CSS

Does anyone has a solution for this css gradient?有没有人有这个 css 渐变的解决方案? Gradient坡度

This is the css I use now:这是我现在使用的css:

background: transparent radial-gradient(closest-side at 50% 50%, #202020 0%, #202020BC 18%, #82DB563C 100%, #83DC563B 100%) 0% 0% no-repeat padding-box;

border: 1px solid #83DC56;边框:1px 实心 #83DC56; opacity: 1;不透明度:1;

You an use an ellipse at top to get this kind of effect.您可以ellipse at top使用ellipse at top来获得这种效果。 Here's an example I made for you.这是我为您制作的示例。 You of course can play around with the colors to get it to what you want.你当然可以玩弄颜色来达到你想要的效果。

 div { background: transparent radial-gradient(ellipse at top, #202020 40%, #006400 100%, #39FF14 100%); border: 1px solid #83DC56; opacity: 1; height: 100px; width: 700px; }
 <div></div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM