CSS3 :nth-child() 选择器 定义和用法: :nth-child(n) 选择器匹配属于其父元素的第 N 个子元素,不论元素的类型。 n 可以是数字、关键词或公式。...
CSS3 :nth-child() 选择器
定义和用法:
:nth-child(n) 选择器匹配属于其父元素的第 N 个子元素,不论元素的类型。
n 可以是数字、关键词或公式。
:first-child第一个
:last-child最后一个
CSS3 :nth-child() 选择器 定义和用法: :nth-child(n) 选择器匹配属于其父元素的第 N 个子元素,不论元素的类型。 n 可以是数字、关键词或公式。...
CSS3 :nth-child() 选择器
定义和用法:
:nth-child(n) 选择器匹配属于其父元素的第 N 个子元素,不论元素的类型。
n 可以是数字、关键词或公式。
:first-child第一个
:last-child最后一个
上一篇:CSS自动隐藏超出宽度的内容
下一篇:缩放:scale()
一般的文字截断(适用于内联与块):.text-overflow { display:block;/*内联对象需加*/ width:31em;/*指定宽度*/ word-break:keep-all;/* 不换行 */
<!-- 声明文档使用的字符编码 --> <meta charset='utf-8'> <!-- 优先使用 IE 最新版本和 Chrome --> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<ul><!--{iCMS:article:list loop="true" row="20" }--> <!--{if $article_list.first}--><li><!--{/if}--> <!--{"$article_list.index % 2"}--> <span><!--{$article_list.title}--></span> <!--{if $article_list.index % 2}--> <
CSS3 :nth-child() 选择器 定义和用法: :nth-child(n) 选择器匹配属于其父元素的第 N 个子元素,不论元素的类型。 n 可以是数字、关键词或公式。
<script type="text/javascript"> $('.artbody *[style]').each(function(){ if($(this).css('text-align') == 'center') $(this).css('text-indent', '0em'); });