Section with two colors

3

I'm having trouble making a section with two colors (one occupying 70% of the section and the other color the remaining 30%), I would like to know how I can do this

follow the example:

suggestions?

    
asked by anonymous 23.10.2018 / 03:39

1 answer

6

You can use linear-gradient() to achieve the desired effect.

  

The linear-gradient() function of the CSS creates an image with consistency   progressive between two or more colors along a straight line.

section {
  width: 100%;
  height: 10rem;
  background-image: linear-gradient(to bottom, blue 0, blue 70%, yellow 30%);
}
<section></section>

References:

23.10.2018 / 03:46