随笔分类 - Css
摘要:示例:tabs的样式是有边框有间距且有下划线的这种情况,此时点击tab的时候默认下划线滑动距离只能是tab的宽度(横向)或者高度(纵向),不包含边框和间距的距离,所以下划线和tab会错位显示。(以下以纵向tabs为例,tab的高度为36px, 边框为1px, 下边距为10px) 解决方法: 修改点击
阅读全文
摘要:原因: 当元素设置了flex-wrap:wrap之后会有一个默认属性 align-content: stretch。元素被拉伸以适应容器。解决方法: 添加:align-content:flex-start; 使元素位于容器的开头。
阅读全文
摘要:正三角: .upTriangle{ width: 0; height: 0; border-top: 4px solid #FFFFFF; border-left: 4px solid #FFFFFF; border-right: 4px solid #FFFFFF; border-bottom:
阅读全文
摘要:1. display 方法(最常用的方法) display: flex; justify-content: center; align-items: center;2. 定位 1)固定宽高(100px) .parent{ position: relative; } .child{ position:
阅读全文
摘要:最后一个不加伪类: ul li:not(:last-child)::after { content: ''; height: 14px; border: 1px solid #3c423f; position: absolute; top: 4px; right: 0;} 给最后一个和第一个不加伪类
阅读全文
摘要:* 放大缩小正面 */.front-pai{ width: 200rpx; height: 258rpx; background-color: #e24444; padding-bottom: 14rpx; box-sizing: border-box; position: absolute; to
阅读全文
摘要:/* 翻的正面 */.front-pai{ width: 200rpx; height: 258rpx; background-color: #e24444; padding-bottom: 14rpx; box-sizing: border-box; position: absolute; top
阅读全文
摘要:.multiple-lines-ellipsis{ overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 5; /*! autoprefixer: ignore next */ //
阅读全文