freeCodeCamp/guide/chinese/certifications/responsive-web-design/applied-visual-design/create-a-gradual-css-linear.../index.md

20 lines
746 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Create a Gradual CSS Linear Gradient
localeTitle: 创建渐进的CSS线性渐变
---
##创建渐进式CSS线性渐变
要创建线性渐变,您必须至少定义两个色标。颜色停止是您想要渲染平滑过渡的颜色。您还可以设置起点和方向(或角度)以及渐变效果。
语法总是:
```
background-image: linear-gradient(angle, color-stop1, color-stop2);
```
颜色可以以hex和rgb格式使用。尝试一下你会明白使用它是多么容易和美丽。
## 资源
[此链接提供有关此主题的广泛信息。](https://www.w3schools.com/css/css3_gradients.asp)
[此外您可能想要查看The Net Ninja的Youtube视频。](https://www.youtube.com/watch?v=wTk4Wuckd0U)