background gradient horizontal css

CSS
background: linear-gradient(to left, #333, #333 50%, #eee 100%);.element {
    background: linear-gradient(90deg, pink 50%, cyan 50%);
}
Source

Also in CSS: