随笔分类 -  CSS

摘要:Grid局部,当该容器的元素,需要成行成列的排列时,适合使用Grid 有两种设置: .grid-container { display: grid;} .grid-container { display: inline-grid;} gap = row-gap+column-gap 一、在外部容器上 阅读全文
posted @ 2022-12-08 14:00 内心澎湃的水晶侠 阅读(90) 评论(0) 推荐(0) 编辑
摘要:Flex 布局 单行多元素,可以考虑Flex布局,好处是居中、对齐比较好控制 容器布局,决定使用Flex,横向(row row-reverse)还是纵向排列(column column-reverse),是否折行(flex-wrap, nowrap wrap) Div里头的字,也比较好决定水平、垂直 阅读全文
posted @ 2022-12-08 11:18 内心澎湃的水晶侠 阅读(689) 评论(0) 推荐(0) 编辑
摘要:绝对定位时,不是相对于父容器最左侧的那个点,而是相对于左上角,减去border之后定位的 阅读全文
posted @ 2022-07-09 17:00 内心澎湃的水晶侠 阅读(14) 评论(0) 推荐(0) 编辑
摘要:transform: translate(20px,10px) 将元素水平右平移20px 向下平移10px transform: translate3d(20px,10px,30px) 将元素水平右平移20px 向下平移10px,zIndex增加30px transform: scale(0.5,2 阅读全文
posted @ 2022-07-03 18:28 内心澎湃的水晶侠 阅读(254) 评论(0) 推荐(0) 编辑
摘要:遍历所有css文件,遍历文件里的每一条规则样式,取出规则的选择器,规则的内容。private setSrcToStyleSheet(src: string, notifyState: NotifyState): void { var sheets = document.styleSheets; fo 阅读全文
posted @ 2022-07-03 18:28 内心澎湃的水晶侠 阅读(307) 评论(0) 推荐(0) 编辑
摘要:常见的外观 outline: none; p { border:red solid thin; outline-style:solid; outline-color:#00ff00; outline-width:1px; } 元素border外面的线,不占据空间 resize: none; 仅仅是给 阅读全文
posted @ 2021-07-17 18:42 内心澎湃的水晶侠 阅读(60) 评论(0) 推荐(0) 编辑
摘要:#test2 { width: 100px; height: 100px; border-radius: 25px; background-color: rebeccapurple; } #test2 { width: 100px; height: 100px; border-radius: 50p 阅读全文
posted @ 2021-07-17 18:32 内心澎湃的水晶侠 阅读(36) 评论(0) 推荐(0) 编辑
摘要:.container { display: flex; width: 800px; height: 150px; } .item { font-size: 50px; font-weight: 500; width: 200px; text-align: center; } 一、容器属性,子元素排列 阅读全文
posted @ 2021-07-17 18:07 内心澎湃的水晶侠 阅读(51) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示