随笔分类 -  html+css

摘要:css边框1px问题: 原链接:https://blog.csdn.net/duola8789/article/details/95456188 阅读全文
posted @ 2021-03-31 11:03 前端HL 阅读(128) 评论(0) 推荐(0) 编辑
摘要:解决方案: 确保HTML、CSS文件使用UTF-8格式,并且HTML文档也使用UFT-8的字符编码格式,即HTML文档的meta信息包含 <meta charset="UTF-8"> 。 避免在CSS的:before, :after中使用中文,如果一定要使用,可以使用中文对应的Unicode。可以使 阅读全文
posted @ 2021-02-03 16:08 前端HL 阅读(293) 评论(0) 推荐(0) 编辑
摘要:图片水平居中 <style> *{margin: 0; padding: 0;} .demo{ width: 400px; height: 300px; border: 1px dashed #ccc; display: table-cell; vertical-align: middle; tex 阅读全文
posted @ 2020-12-31 17:12 前端HL 阅读(76) 评论(0) 推荐(0) 编辑
摘要:转载原链接:https://blog.csdn.net/qq_42354773/article/details/81018615 { padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-ins 阅读全文
posted @ 2020-07-29 14:17 前端HL 阅读(180) 评论(0) 推荐(0) 编辑
摘要:1.input光标偏上问题 本人是这样解决的: 就是input不要设置行高,假设设置height:.4rem;若想上下居中,就用padding来弄,如: padding:.05rem 0 .05rem .1rem;这样就能上下居中啦 2.input文字偏下问题,如何改成上下居中呢? 解决办法就是in 阅读全文
posted @ 2020-06-08 17:56 前端HL 阅读(1771) 评论(0) 推荐(0) 编辑
摘要:公共文件定义css变量,ie不兼容 /* 使用css变量 */ :root{ --bg-color:#fff; --mt:.2rem; --border:1px solid #f6f4f1; } 内页其他css文件就可以这样套用: .demo{background-color: var(--bg-c 阅读全文
posted @ 2020-04-15 10:47 前端HL 阅读(196) 评论(0) 推荐(0) 编辑
摘要:BEM命名法: 1.https://www.jianshu.com/p/1e5438c8adb4 2.https://www.jianshu.com/p/1e5438c8adb4 阅读全文
posted @ 2020-03-25 09:54 前端HL 阅读(156) 评论(0) 推荐(0) 编辑
摘要:百度上搜索的解释: <h1>标签具有标题意思,一个网页唯一标题的意思,对于搜索引擎来说遇到此标签说明此标签内内容有点重要,所以有让搜索引擎知道此处具有重要性内容,这个网页也是围绕此标题内容进行或相关的内容,我们把关键字放入此标签在某种程度说我们通过浏览器看起效果没什么不同但是对于搜索引擎优化(SEO 阅读全文
posted @ 2020-03-21 09:42 前端HL 阅读(242) 评论(0) 推荐(0) 编辑
摘要:样式: 在iPhone plus点击input框出生日期时会出现如下图: 为了去掉下面那条苹果自带的,可以这样处理:在HTML中的input标签内部添加属性: 阅读全文
posted @ 2019-12-05 17:36 前端HL 阅读(1144) 评论(0) 推荐(0) 编辑
摘要:前端中常见路径./使用 1. 去~根目录: / index.html里面:src="/a.jpg" 就可以访问到JPG文件。 2.当前目录:./ (即和index.html同一级,即Two文件夹下) index.html里面:src="./a.jpg" 就可以访问到JPG文件(src="a.jpg" 阅读全文
posted @ 2019-10-29 09:36 前端HL 阅读(1566) 评论(0) 推荐(0) 编辑
摘要:1. 2. 阅读全文
posted @ 2019-09-03 09:09 前端HL 阅读(3167) 评论(0) 推荐(0) 编辑
摘要:默认,如图: 当input框输入文字的时候背景会变色,如图: 有两种方法: 1.在form标签里家这个属性就行: autocomplete="off" 阅读全文
posted @ 2019-06-24 11:16 前端HL 阅读(3972) 评论(0) 推荐(0) 编辑
摘要:<meta http-equiv="X-UA-Compatible" content="ie=edge">vscode创建html文件默认有这串代码,原来这个的意思是: Edge 模式通知 Windows Internet Explorer 以最高级别的可用模式显示内容,这实际上破坏了“锁定”模式。 阅读全文
posted @ 2019-04-28 08:56 前端HL 阅读(263) 评论(0) 推荐(0) 编辑
摘要:下拉框select中option居中样式 阅读全文
posted @ 2019-03-12 08:58 前端HL 阅读(2107) 评论(0) 推荐(0) 编辑
摘要:css中如何实现左边的高度随着右边改变而改变 html结构: css样式: 实际上起到核心作用的是padding-bottom:9999px; margin-bottom:-9999px;这一部分让div填充满整个父框架 阅读全文
posted @ 2019-03-02 10:36 前端HL 阅读(1892) 评论(0) 推荐(0) 编辑
摘要:原链接:http://www.cnblogs.com/chenshihaook/p/6186343.html HTML提供了5种空格实体(space entity),它们拥有不同的宽度,非断行空格(&nbsp;)是常规空格的宽度,可运行于所有主流浏览器。其他几种空格( &ensp; &emsp; & 阅读全文
posted @ 2018-12-24 16:30 前端HL 阅读(366) 评论(0) 推荐(0) 编辑
摘要:如:这样子少一层是很好,但为了美观,后面都补上a,但鼠标经过也会有背景色,所以还是得多一层li 解决后: 阅读全文
posted @ 2018-05-15 16:08 前端HL 阅读(140) 评论(0) 推荐(0) 编辑
摘要:同样设置35px,input略显高: input加个样式就行 阅读全文
posted @ 2018-04-03 17:31 前端HL 阅读(1001) 评论(0) 推荐(0) 编辑

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