All vehicles entering or crossing railroad crossings on which stop signs are erected shall come to a full stop as near the right-of-way line as possible before entering or crossing such railroad crossing, and regardless of direction, shall give the right-of-way to trains upon the tracks to be crossed. All vehicles entering or crossing railroad crossings on which are installed traffic signals or traffic lights shall come to a stop as indicated by the traffic signal or traffic light. No person shall drive any vehicle through, around, or under any crossing gate or barrier at a railroad crossing while such gate or barrier is closed or is being opened or closed.