Hades' Land

Hades is the lord of the dead and ruler of the nether world, which is referred to as the domain of Hades or, by transference, as Hades alone.

用CSS定义一行最多显示几个字的方法

昨天改一个js脚本,想顶部的文字只显示一行,多出的部分截取子串,后面的用省略号代替。
首先想到肯定是js的字符串操作啦,可是改来改去老是提示“对象不支持该属性”,我汗......
看来自己js学艺不精~
后来想想,其实用css就能实现了,以后有些事情不能想得太复杂了,学会换位思考,555555555

定义它最多只能显示多少字符数,如果多于我定义的字符数那么让它后面以省略后显示
完整代码:

浏览全文

共1页 First  Pre   1  Next   Last

日历

<< 2010-7 >>

Sun

Mon

Tue

Wed

Thu

Fri

Sat

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

导航

  

日志分类

日志归档

Tags

This Blog is Base on Z-blog,and modified by Hades Studio in China.
© Copyright 2007-2010 Hades.All Rights Reserved.

© Powered by Z-blog 1.8 Arwen Build 90619. 2007-2010, All Rights Reserved.