Select all elemens between two class names css

                  /*https://codepen.io/t_afif/pen/QWZqpYN*/

.container > * {
  border:1px solid;
  margin: 10px;
  padding: 5px;
  font-size: 20px;
  min-height: 1.2em;
}
.container [class]::before {
  content: attr(class) " ";
}

.start ~ :not(.end,.end ~ *) {
  color: red;
}
.start ~ div:not(.end,.end ~ *)::before {
  content: " I am selected !!"
}