前端 - CSS 如何设置自动滚动定位的“安全”间距?_个人文章 - SegmentFault 思否
欢迎关注我的公众号:前端侦探介绍两个和滚动定位相关的 CSS 属性:scroll-padding和 scroll-margin在平时开发中,经常会碰到需要快速定位的问题,比如常见的锚点定位<l
顺晟科技
2021-09-24 13:20:08
253
i{ display: inline-block; width: 10px;height:5px; background: red;line-height: 0;font-size:0;vertical-align: middle;-webkit-transform: rotate(45deg);}
i:after{content:\'/\';display:block;width: 20px;height:5px; background: red;-webkit-transform: rotate(-90deg) translateY(-50%) translateX(50%);}
× //叉的创建 a{ display: inline-block; width: 20px;height:5px; background: red;line-height: 0;font-size:0;vertical-align: middle;-webkit-transform: rotate(45deg);} a:after{content:\'/\';display:block;width: 20px;height:5px; background: red;-webkit-transform: rotate(-90deg);} //视频播放图标 .course[data-type="2"] { .course__cover { &:before, &:after { content: \'\'; display: block; position: absolute; left: 5px; bottom: 5px; } &:after { //实现圈圈 width: 20px; height: 20px; border: 2px solid white; background: rgba(0, 0, 0, .6); border-radius: 12px; background-clip: padding-box; } &:before { //实现三角形 height: 0; width: 0; border-left: 8px solid white; border-top: 5px solid transparent; border-bottom: 5px solid transparent; margin-left: 9px; margin-bottom: 7px; z-index: 5; } } }
17
2022-11
17
2022-11
17
2022-11
17
2022-11
17
2022-11
17
2022-11