随笔分类 -  h5c3

摘要:margin-top 元素向上拖拽 margin-left 元素向左拖拽 margin-bottom 元素本身不变,下边元素上移 margin-right 元素本身不变,右边元素左移 阅读全文
posted @ 2021-08-16 19:49 吴小明- 阅读(57) 评论(0) 推荐(0) 编辑
摘要:Safari浏览器不支持 white-space: nowrap; 使用时为了兼容 Safari 需要加上宽度限制 阅读全文
posted @ 2021-07-30 11:30 吴小明- 阅读(382) 评论(0) 推荐(0) 编辑
摘要:前提:设计稿为750px 1、下载flexible.js:(它的原理是将当前设备宽度划分为10等份) (function flexible (window, document) { var docEl = document.documentElement var dpr = window.devic 阅读全文
posted @ 2020-08-12 17:54 吴小明- 阅读(1017) 评论(0) 推荐(0) 编辑
摘要:1、引入flexible.js文件: (function flexible(window, document) { var docEl = document.documentElement; var dpr = window.devicePixelRatio || 1; // adjust body 阅读全文
posted @ 2020-08-12 17:17 吴小明- 阅读(2501) 评论(1) 推荐(2) 编辑
摘要:不可继承的: display margin padding border background height min-height max-height width min-width max-width overflow position left right top bottom z-index 阅读全文
posted @ 2020-08-05 20:17 吴小明- 阅读(719) 评论(0) 推荐(0) 编辑
摘要:::-webkit-scrollbar :滚动条整体部分,其中的属性有width,height,background,border等。 ::-webkit-scrollbar-button :滚动条两端的按钮。可以用display:none让其不显示,也可以添加背景图片,颜色改变显示效果。 ::-w 阅读全文
posted @ 2020-07-17 16:24 吴小明- 阅读(239) 评论(0) 推荐(0) 编辑
摘要:如果是在标签内加icon &#xe70d; 如果是使用class <i class='iconfont icon-wrong'></i> 如果是放在伪元素中使用: 需要将类名iconfont中的样式拿过来: .el-form-item__error::before { content: '\e70d 阅读全文
posted @ 2020-07-10 17:11 吴小明- 阅读(1281) 评论(0) 推荐(0) 编辑
摘要:height: calc(100vh - 100px); 屏幕高度减去100px flex-shrink:0; 防止控件压缩变形 outline:none; 取消input选中时的边框 width:max-content; 最大内容区宽度 阅读全文
posted @ 2020-03-08 21:56 吴小明- 阅读(154) 评论(0) 推荐(0) 编辑
摘要:猫眼电影、天天: 1、安装cssrem插件 2、设置 >搜索cssrem > Fixed Digits 改为2 px转rem小数点最大长度,默认:6 Root Font Size 改为 50 根字体大小,默认是16px,即1rem = 16px,可自定义 修改完要重启vscode,此时输入50.5p 阅读全文
posted @ 2020-02-20 21:53 吴小明- 阅读(1882) 评论(0) 推荐(0) 编辑
摘要:/* 通用样式 */ body,p,ul,ol,dl,dd,hr,h1,h2,h3,h4,h5,h6,figure,ul,ol,th,td,button,input,fieldset,legend,textarea,option{margin: 0;padding: 0;} table{border 阅读全文
posted @ 2020-02-05 17:19 吴小明- 阅读(1548) 评论(0) 推荐(0) 编辑
摘要:效果一:(css+dom实现) 代码: <!doctype html> <html lang="zh-cn"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable 阅读全文
posted @ 2020-01-09 16:31 吴小明- 阅读(1384) 评论(0) 推荐(0) 编辑
摘要:加上样式: input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; } input[type="number"]{ -moz-appearance: textfiel 阅读全文
posted @ 2019-12-07 14:27 吴小明- 阅读(1059) 评论(0) 推荐(0) 编辑
摘要:日期转换成时间戳: 安卓下可以使用 Date.parse(new Date('2019-11-18 12:00:00')) 直接转换,结果为 1574049600000 ios下 Date.parse(new Date('2019-11-18 12:00:00')) 无法转换,需要写成Date.pa 阅读全文
posted @ 2019-11-18 17:29 吴小明- 阅读(351) 评论(0) 推荐(0) 编辑
摘要:先来一段基本布局 <!doctype html> <html> <head> <meta charset="utf-8"> <title>无标题文档</title> <style> .container { display: grid; grid-template-columns: 100px 10 阅读全文
posted @ 2019-11-18 11:53 吴小明- 阅读(265) 评论(0) 推荐(0) 编辑
摘要:一、什么是BEM BEM就是块(block)、元素(element)、修饰符(modifier),是由Yandex团队提出的一种前端命名方法论。这种巧妙的命名方法可以使css类对其他开发者来说更加透明且具有意义。BEM约定更加严格,而且包含更多的信息,它们用于一个团队开发一个耗时较大的项目。 BEM 阅读全文
posted @ 2019-09-29 17:18 吴小明- 阅读(988) 评论(0) 推荐(0) 编辑
摘要:1、html+css经典布局 ①左列定宽,右列自适应 .left{width:100px;float:left;} .right{overflow:hidden;} ②两列顶宽,中栏自适应 .left{width:100px;float:left;} .right{width:100px;float 阅读全文
posted @ 2019-09-26 09:52 吴小明- 阅读(246) 评论(0) 推荐(0) 编辑
摘要:1、XHTML必须被正确的嵌套 2、XHTML元素必须被关闭 3、XHTML标签名必须用小写字母 4、XHTML文档必须拥有根元素 阅读全文
posted @ 2019-08-17 11:46 吴小明- 阅读(256) 评论(0) 推荐(0) 编辑
摘要:①给父元素单独定义高度 优点:简单快速、代码少。 缺点:无法进行响应式布局。 ②在标签结尾处加空div标签<div style="clear: both"></div> 优点:简单快速、代码少,兼容性较高。 缺点:增加空标签,不利于页面优化。 ③父级定义overflow:hidden 优点:简单快速 阅读全文
posted @ 2019-08-17 00:44 吴小明- 阅读(148) 评论(0) 推荐(0) 编辑
摘要:<div id="left">我是左边</div> <div id="center">我是中间</div> <div id="right">我是右边</div> html,body{ margin: 0px;width: 100%; } #left,#right{width: 200px;heigh 阅读全文
posted @ 2019-08-17 00:43 吴小明- 阅读(939) 评论(0) 推荐(0) 编辑
摘要:父级给相对定位,子级给绝对定位,margin设置为auto,上下左右值设为0。 父级给相对定位,子级给绝对定位,设置left和top为50%,再向左和向上移动负的子级一半。 position: absolute; left: 50%; top: 50%; transform: translate(- 阅读全文
posted @ 2019-08-17 00:25 吴小明- 阅读(3213) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示