摘要: 1、width 不设置默认宽度铺满全屏,如果要实现宽度随着文字长度自适应,css width:fit-content; 2、如果要实现文字自动换行,最多显示三行,超出显示省略号 overflow: hidden; text-overflow: ellipsis; display: -webkit-b 阅读全文
posted @ 2022-06-08 14:39 小阿飞ZJF 阅读(1188) 评论(0) 推荐(0) 编辑
摘要: 一、方式一: 1、html <div class="img-wrap"> <img :src="./img.jpg"> </div> 2、css .img-wrap { position: relative; width: 100%; height: 0px; padding-top: 100%; 阅读全文
posted @ 2022-06-08 14:02 小阿飞ZJF 阅读(1696) 评论(0) 推荐(0) 编辑
摘要: 一、容器属性 1、display: grid; 块级的网格布局。 2、display: inline-grid; 行内的网格布局。 3、grid-template-columns 指定列的宽度。 ① grid-template-columns:10px 20px 30%; 设置列,有几个值就代表有几 阅读全文
posted @ 2022-06-08 11:59 小阿飞ZJF 阅读(243) 评论(0) 推荐(0) 编辑