
css
文章平均质量分 52
Shirley_RL
Stay hungry Stay foolish
展开
-
前端渣渣记录一
CSS盒子模型: CSS定位:static, relative,fixed,absolute,flex 最近定位祖先:定位元素 absolute 是相对于其最近的定位祖先位置,不占空间 div、h1 或 p 元素常常被称为块级元素。这意味着这些元素显示为一块内容,即“块框”。与之相反,span 和 strong 等元素称为“行内元素”,这是因为它们的内容显示在行中,即“行内框”。 abso原创 2016-04-05 22:55:31 · 372 阅读 · 0 评论 -
CSS选择器
nth-of-typep:nth-of-type(2) 父元素的p元素的第二个p<!DOCTYPE html> <html> <head> <style> p:nth-of-type(2) { background:#ff0000; } </style> </head> <body><h1>这是标题</h1> <p>第一个段落。</p> <p>第二个段落。</p> <p>第三个段落。</p> <p原创 2016-03-25 00:43:53 · 305 阅读 · 0 评论