We can achieve animating a plus into an X through very simple CSS rotation.

.dropdown-container .dropdown-button span::after {
    transition: transform .5s;
}
 
.dropdown-container.active .dropdown-button span::after {
    transform: rotate(45deg);
}