CSS3入门【四】 文本效果
程序员文章站
2022-05-11 08:16:48
...
实例
1. 带阴影的文本(text-shadow)
HTML代码:
<h1 id="aa">二十四桥明月夜,玉人何处教吹箫</h1>
CSS代码:
#aa{
text-shadow: 10px 10px 10px #0000FF;
}
效果如下:2. CSS3新增文本属性
hanging-punctuation: none|first|last|allow-end|force-end;
值 | 描述 |
---|---|
none | 不在文本整行的开头还是结尾的行框之外放置标签符号 |
frist | 标点附着在首行开始边缘之外 |
last | 标点附着在首行结尾边缘之外 |
allow-end | |
force-end |
punctuation-trim: none|start|end|allow-end|adjacent;
值 | 描述 |
none | 不修剪开启或闭合标点符号 |
start | 修剪每行结尾的开启标点符号 |
end | 修剪每行结尾的闭合标点符号 |
allow-end | |
adjacent |
text-emphasis: text-emphasis-style text-emphasis-color;
值 | 描述 |
text-emphasis-style | 向元素的文本应用重点标记 |
text-emphasis-color | 定义重点标记前景色 |
text-justify: auto|inter-word|inter-ideograph|inter-cluster|distribute|kashida|trim;
text-outline: thickness blur color;
text-overflow: clip|ellipsis|string;
text-shadow: h-shadow v-shadow blur color;
text-wrap: normal|none|unrestricted|suppress;
word-break: normal|break-all|keep-all;
word-wrap: normal|break-word;
——详情参见http://www.w3school.com
上一篇: MySQL数据库分库分表脚本实现
下一篇: CSS3扁平化Loading动画特效