Local authorities may by ordinance require that pedestrians shall strictly comply with the directions of any official traffic-control signal and may by ordinance prohibit pedestrians from crossing any roadway in a business district or any designated highways except in a crosswalk.