用css来截取。 用两句代码来解决。 text-overflow:ellipsis; //这句是重点,表示用省略号来代替截取的部分。 white-space:nowrap; //这句表示字符不换行。 代码兼容ie6+ , 火狐, google chrome
css, 省略号
You can follow any responses to this entry through the RSS 2.0 Both comments and pings are currently closed.