摘要: <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no"> <!-- 兼容处理:如果可能,调取ie高版本内核 --> <meta http-equiv="X-UA-Compatible 阅读全文
posted @ 2021-04-07 10:34 诡道也 阅读(44) 评论(0) 推荐(0) 编辑
摘要: html代码如下: 固定样式: 方法一:利用定位(常用方法,推荐) .parent{ position:relative; } .child{ position:absolute; top:50%; left:50%; margin-top:-50px; margin-left:-50px; } 方 阅读全文
posted @ 2021-04-07 10:33 诡道也 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 当父级使用了flex布局,当内部子元素总宽度大于它的宽度时,就会等比例压缩子元素宽度,解决方法就是 1、给所有的子元素设置flex-shrink:0;2、将所有子元素的width属性更改为min-width; 阅读全文
posted @ 2021-04-07 10:32 诡道也 阅读(81) 评论(0) 推荐(0) 编辑