随笔分类 -  css

css常用选择器
摘要:1.常用子元素选择器-选择特定子元素 :nth-of-type(n) 选择其父级下的第n个元素 例如:p:nth-child(2):last-of-type 选择其父级下的最后一个元素:nth-child(n) 选择其父级下的第n个子元素:nth-last-child(n) 选择其父级下的第n个子元 阅读全文

posted @ 2023-06-16 15:33 有匪 阅读(47) 评论(0) 推荐(1) 编辑

10月css 学习记录
摘要:1.滚动条css样式: html{ box-sizing:border-box; scrollbar-width:thin;}*,*:before,*:after{ box-sizing: inherit; scrollbar-width:inherit;}//伪元素无法继承*::-webkit-s 阅读全文

posted @ 2022-10-08 17:19 有匪 阅读(34) 评论(0) 推荐(0) 编辑

css 水平居中,垂直居中
摘要:<div class="box"> <img src="./1.jpg" alt=""/></div> 第一种:水平居中 .box { width:300px; height:300px; border:2px solid red;}img{ display:block; width:100px; 阅读全文

posted @ 2020-04-21 11:57 有匪 阅读(207) 评论(0) 推荐(0) 编辑

css 面试题
摘要:1、标准的css 盒子模型 与低版本IE的盒子模型有什么不同? 标准盒子模型: 宽度 = 内容的宽度(content) + border + padding +margin ;低版本 IE 盒子模型: 宽度 = 内容宽度 (content + border + padding) + margin ; 阅读全文

posted @ 2020-03-26 16:23 有匪 阅读(153) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示