![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
css
文章平均质量分 52
Cribug8080
这个作者很懒,什么都没留下…
展开
-
css的父选择器
css的父选择器首先声明一点,目前没有css的父选择器。新出的css3也没有。但是已经有很多人有很多次提案了。反向选择在2008年Shaun Inman建议这种父选择器。a < img{ border: none;}这段css的目的是选择img元素的a标签。parentRemy Sharp建议使用:parenta img:parent { background: ...原创 2019-05-22 18:49:45 · 43498 阅读 · 1 评论 -
css flex
flex 是 flex-grow、flex-shrink、flex-basis的缩写。flex-grow:用于设置或检索弹性盒的扩展比率。用人话说就是,是其他盒子的几倍。flex-shrink:用于设置或检索弹性盒的收缩比率。是其他盒子的几分之一。例如:flex-shrink: 3表示是其他盒子的三分之一flex-basis:设置或检索弹性盒伸缩基准值。...原创 2019-06-11 13:56:24 · 564 阅读 · 0 评论 -
css position
css positionstatic该关键字指定元素使用正常的布局行为,即元素在文档常规流中当前的布局位置。此时 top, right, bottom, left 和 z-index 属性无效。relative该关键字下,元素先放置在未添加定位时的位置,再在不改变页面布局的前提下调整元素位置(因此会在此元素未添加定位时所在位置留下空白)。position:relative 对 table-...原创 2019-07-15 18:23:16 · 289 阅读 · 0 评论 -
css伪类选择器
查看demo<style> p:last-child{ background-color: #ccc; } div>:not(p){ color: blue; } div p:not(:last-child){ border: 1px solid #ccc; }</style...原创 2019-07-16 10:07:11 · 184 阅读 · 0 评论 -
css 所有的单位
尺寸单位单位属性描述px相对Pixel。相对屏幕分辨率。win96像素/英寸。MAC72像素/英寸。em相对相对于字体。例如:字体14px。1em=14px。2em=28px。rem相对相对于根元素HTML的字体大小,广泛应用于移动端适配vw相对视口宽度的1/100vh相对视口高度的1/100vmin相对相对于视口的宽度...原创 2019-08-12 17:29:53 · 241 阅读 · 0 评论 -
文本css省略号
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-U...原创 2019-08-22 19:05:12 · 153 阅读 · 0 评论