上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 87 下一页
摘要: 1. steps基本用法 animation-timing-function: steps(number, [end | start]) steps(number, [end | start]) 是将动画分为number段,共有number + 1帧画面。 注意,steps(n)函数中的n,并不是k 阅读全文
posted @ 2023-08-22 14:39 全玉 阅读(68) 评论(0) 推荐(0) 编辑
摘要: 命令名称参数 M moveto 移动到 (x y)+ Z closepath 关闭路径 (none) L lineto 画线到 (x y)+ H horizontal lineto 水平线到 x+ V vertical lineto 垂直线到 y+ C curveto 三次贝塞尔曲线到 (x1 y1 阅读全文
posted @ 2023-08-18 16:18 全玉 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 1. border 2. outline outline 与border很像,但是outline支持偏移outline 不占据空间,很牛B的特性,绘制于元素内容周围。outline 通常是矩形,但也可以是非矩形的。 /* 颜色 | 样式 | 宽度 */ outline: green solid 3p 阅读全文
posted @ 2023-08-16 11:01 全玉 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 方法1. 使用flex或grid布局 flex和grid布局的默认子元素就是stretch,只需设置父元素 display:flex或display:grid即可 若多个元素布局不同,则可单独设置某个元素的布局,align-self: stretch 阅读全文
posted @ 2023-08-14 15:23 全玉 阅读(353) 评论(0) 推荐(0) 编辑
摘要: counter-reset <名称> <初始值> 定义计数器(名称) counter-increment <名称> <步长> 设置计数器步长 counter(<名称>) / counters(<名称>) 使用计数器 1. counter-reset counter-reset: count1 1.1 阅读全文
posted @ 2023-08-14 11:09 全玉 阅读(43) 评论(0) 推荐(0) 编辑
摘要: 1. 选择包含特定子元素的元素,即 选择父元素 li:has(p, #h3) li:has(p.cls) a:has(> img) .item:has(.thumb:hover) 1.1 检查是否有空元素 .box:has(span:empty) 1.2 检查是否有多个孩子节点 .box:has(p 阅读全文
posted @ 2023-08-14 10:20 全玉 阅读(136) 评论(0) 推荐(0) 编辑
摘要: svg foreignObject主要能实现 文本换行 和 dom转图片 两个功能 1. svg文本换行 svg文字功能很弱,不支持自动换行,需要用tspan进行截断 <svg xmlns="http://www.w3.org/2000/svg"> <text font-size="16"> <ts 阅读全文
posted @ 2023-08-13 16:11 全玉 阅读(271) 评论(0) 推荐(0) 编辑
摘要: vw的兼容性已经没问题,现在推荐优先使用vw 但是rem布局还是有其用武之地,比如需要动态改变字体大小的场景(有小,中,大三种字体,可手动选择,方便不同人群查看) vw 和 rem 的兼容性 | 兼容性 | ios | 安卓 | | rem | 4.1+ | 2.1+ | | vw | 6.1+ | 阅读全文
posted @ 2023-08-12 14:02 全玉 阅读(17) 评论(0) 推荐(0) 编辑
摘要: xx:focus-within xx的子元素被聚焦,则选择器触发,可实现父选择器功能 除了 <button>,<input>,<select>,<a> 这些可聚焦的元素, 可通过 tab-index 或 contenteditable 这些属性使得元素可聚焦 这样任何元素都能触发 focus-wit 阅读全文
posted @ 2023-08-11 18:57 全玉 阅读(75) 评论(0) 推荐(0) 编辑
摘要: <div class="menuc"> <a href="javascript:" class="menu-item" tabindex="0">菜单</a> <div class="sub-menu"> <a href="https://www.bing.com/">子菜单跳转</a> <a hr 阅读全文
posted @ 2023-08-11 16:23 全玉 阅读(67) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 87 下一页