CSS 3 学习笔记

css 3 学习笔记

文本:
 
word-wrap : normal | break-word
取值:
normal:
    控制连续文本换行。
break-word:
    内容将在边界内换行。如果需要,词内换行(word-break)也会发生。



text-overflow : clip | ellipsis
取值:
clip:
    不显示省略标记(...),而是简单的裁切。
ellipsis:
    当对象内文本溢出时显示省略标记(...)



text-shadow : none | <length> none | [<shadow>, ] * <shadow> 或none | <color> [, <color> ]*

取值:
<color> :
    指定颜色。
<length> :
    由浮点数字和单位标识符组成的长度值。可为负值。指定阴影的水平延伸距离。
<opacity> :
    由浮点数字和单位标识符组成的长度值。不可为负值。 指定模糊效果的作用距离。如果你仅仅需要模糊效果,将前两
    个 length 全部设定为 0 。



选择器

E::selection : {attribute}
相关伪类: E:enabled | E:disabled | E:checked
说明:
匹配E元素中被用户选中或处于高亮状态的部分


E:not(s) : {attribute}
说明:
匹配所有不匹配简单选择符s的元素E



E:empty : {attribute}
相关伪类: E:root | E:nth-child(n) | E:nth-last-child(n) | E:nth-of-type(n) | E:nth-last-of-type(n) |
E:last-child | E:first-of-type | E:only-child | E:only-of-type
说明:
匹配没有任何子元素(包括text节点)的元素E


E[att^="val"] : {attribute}
相关伪类: E[att$="val"] | E[att*="val"]
说明:
匹配具有att属性、且值以val开头的E元素


E[att$="val"] : {attribute}
相关伪类: E[att^="val"] | E[att*="val"]
说明:
匹配具有att属性、且值以val结尾的E元素

E[att*="val"] : {attribute}
相关伪类: E[att^="val"] | E[att$="val"]
说明:
匹配具有att属性、且值中含有val的E元素

E:nth-child(n) : {attribute}
相关伪类: E:root | E:nth-last-child(n) | E:nth-of-type(n) | E:nth-last-of-type(n) | E:last-child |
E:first-of-type | E:only-child | E:only-of-type | E:empty
说明:
匹配父元素中的第n个子元素E

E:nth-last-child(n) : {attribute}
相关伪类: E:root | E:nth-child(n) | E:nth-of-type(n) | E:nth-last-of-type(n) | E:last-child |
E:first-of-type | E:only-child | E:only-of-type | E:empty
说明:
匹配父元素中的倒数第n个结构子元素E

E:nth-of-type(n) : {attribute}
相关伪类: E:root | E:nth-child(n) | E:nth-last-child(n) | E:nth-last-of-type(n) | E:last-child |
E:first-of-type | E:only-child | E:only-of-type | E:empty
说明:
匹配同类型中的第n个同级兄弟元素E

E:first-of-type : {attribute}
相关伪类: E:root | E:nth-child(n) | E:nth-last-child(n) | E:nth-of-type(n) | E:nth-last-of-type(n) |
E:last-child | E:only-child | E:only-of-type | E:empty
说明:
匹配同级兄弟元素中的第一个E元素

E:only-child : {attribute}
相关伪类: E:root | E:nth-child(n) | E:nth-last-child(n) | E:nth-of-type(n) | E:nth-last-of-type(n) |
E:last-child | E:first-of-type | E:only-of-type | E:empty
说明:
匹配属于父元素中唯一子元素的E

原文地址:https://www.cnblogs.com/wisdo/p/4303772.html