Crossover from skin mode to proton-neutron mode in E1 excitations of neutron-rich nuclei