CSS background color gradient

CSS3 gradients allow you to display smooth transitions between two or more specified colors.

Previously, you had to use images to achieve these effects. However, by using CSS3 gradients, you can reduce download times and bandwidth usage. Also, elements with gradients look better when zoomed in because the gradient is generated by the browser.

CSS3 defines two types of gradients:

Linear Gradients - down/up/left/right/diagonal directions
Radial Gradients - defined by their center

CSS

 /* 导航*/
    .app_header{
      padding: 0;
      margin: 0;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      align-items: center;
      background: -webkit-linear-gradient(right,#FBE8EA 0%,#DEF4FF 100%);
      height: 100px;
      width: 100%;
    }

renderings

Navigation bar effect

Guess you like

Origin blog.csdn.net/Depressiom/article/details/123137768