css3 -- 文本

1、坐标轴:

上左为负数

下右为正数

 

2、text-shadow

1 E{text-shadow:x y color;}

还可以负数实现

1  E{text-shadow:x y blur-radius color;}

blur-radius 阴影范围

 

3、text-outline :目前浏览器不支持

text-stroke属性与text-outline 一致,webkit浏览器支持。

1 E{
2     -webkit-text-fill-color:color;
3     -webkit-text-stroke-color:color;
4     -webkit-text-stroke-width:length;
5     -webkit-text-stroke:stroke-width  stroke-color;  ---- 缩写
6 }

 

4、文本限制溢出 text-overflow

text-overflow:ellipsis代表会在溢出点用省略号代替

1 p{
2     overflow:hidden;
3     text-overflow:ellipsis;
4     white-space:nowrap;
5 }

第四行防止文本被折叠成多行

 

5、改变元素大小

1 p{
2    overflow:hidden;
3    resize:both;   ----  horizontal   vertical    both   none  
4 }

让用户可以对元素的大小进行控制

 

6、文本换行

word-wrap:单词折断

1 E{word-wrap:break-word----normal}

 text-wrap:none  normal  unrestricted  suppress(阻止换行)

换行不发生,必要的时候允许单词折断

1 E{
2     text-wrap:suppress;
3     word-wrap:break-word;
4 }

 

7、应用标点属性

text-indent为负值,段落缩进

posted @ 2016-05-26 22:19  ^^-^^-  阅读(122)  评论(0编辑  收藏  举报