首页 > 解决方案 > 使用线性渐变制作 CSS 颜色

问题描述

我是 CSS 用户的新手,我真的很喜欢这种颜色。有没有人知道如何使背景颜色像我指的图片一样?

我尝试使用线性渐变,但没有得到它。

在此处输入图像描述

标签: csscolorsbackground-colorlinear-gradients

解决方案


试试这个代码

从此页面生成https://cssgradient.io/

.ht{
background: rgb(77,77,77);
background: linear-gradient(180deg, rgba(77,77,77,1) 0%, rgba(42,42,42,1) 100%, rgba(0,212,255,1) 100%);width:500px;height:500px;
}
<div class="ht"><h1>Cool Background </h1></div>


推荐阅读