![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
html/css
漂移的电子
哎呀呀
展开
-
解决缓存问题,静态html 引用js、css路径加时间戳
<script type="text/javascript"> var timestamp = new Date().getTime(); document.write('<link href="./index.css?v=' +timestamp+ '" rel="stylesheet" type="text/css"/>') document.write('<script src="./index.js?v='+timestamp+'" type="te.原创 2021-09-01 10:14:40 · 989 阅读 · 0 评论 -
css禁用点击事件
//禁用$('.btn_box').css({"pointer-events": "none","cursor": "default","opacity": "0.5" });//取消$('.btn_box').css({"pointer-events": "auto","cursor": "pointer","opacity": "1" });或者.btn_box_disabled { pointer-events: none; cursor: default; opa原创 2021-07-05 14:46:39 · 1759 阅读 · 0 评论 -
引入layui模态框
<!DOCTYPE html><html> <head> <meta charset="utf-8"> <title></title> <link rel="stylesheet" href="//unpkg.com/layui@2.6.6/dist/css/layui.css"> <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0原创 2021-05-31 12:00:17 · 704 阅读 · 0 评论 -
去掉input点击效果的边框、改变边框颜色
去掉input点击效果的边框 input:focus{ border-color:#009158; outline: none; }原创 2021-05-12 16:57:18 · 2322 阅读 · 0 评论 -
swiper 轮播图
<!DOCTYPE html><html lang="zh"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title></title原创 2021-04-22 19:26:49 · 115 阅读 · 0 评论 -
禁止页面放大缩小&&禁止页面左右晃动
禁止页面放大缩小:<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0, user-scalable=0">禁止页面左右晃动:html, body {height:100%;overflow:auto;margin: 0;}html{overflow-y:scroll;}原创 2021-04-16 15:25:17 · 427 阅读 · 0 评论 -
css字体缩放
当字体设置超过浏览器最小值font-size不起作用时:.demo{ font-size: 10px; display: inline-block; transform: scale(0.7); -webkit-transform: scale(0.7); }原创 2021-04-12 17:30:16 · 5618 阅读 · 0 评论 -
css3绘制三角形 向上、向右、向下、向左
/* 向上 */ .toTop{ width:0; height:0; border-right:10px solid transparent; border-left:10px solid transparent; border-bottom:10px solid red; } /* 向右 */ .toRight{ width:0; height:0; border-top:10px solid trans...原创 2021-03-11 20:30:08 · 648 阅读 · 0 评论 -
解决input 输入框 在自动填充 出现背景色的问题
改变,改变input 输入框 自动填充后的背景颜色 input:-webkit-autofill { box-shadow: 0 0 0px 1000px #283443 inset !important; //改成你想要的背景色 -webkit-text-fill-color:#fff !important; }设透明 (如果你想要背景是透明,此法可解) input:-internal-autofill-previewed, input:-inte转载 2021-03-09 11:29:55 · 4147 阅读 · 1 评论 -
css字体文本自动换行&&多出文字省略号&&只显示一行/两行文字
字体自动换行:word-wrap:break-word;word-break:break-all;overflow: hidden;多的文字用省略号: overflow: hidden; text-overflow: ellipsis; white-space: nowrap;原创 2020-04-14 18:42:30 · 735 阅读 · 0 评论 -
设置多种字体,font-family设置多个值
按优先级依次排开,不同字体之间用逗号隔开 font-family:"Source Han Sans CN","PingFang-SC-Medium","Microsoft YaHei";微软雅黑: Microsoft YaHei宋体:SimSun黑体:SimHei仿宋: FangSong楷体: KaiTi隶书:LiSu幼圆:YouYuan华文细黑:STXihei华文楷体:S...原创 2019-12-27 17:09:05 · 9688 阅读 · 0 评论 -
去掉a标签,点击时的灰色背景
去掉a标签,点击时的灰色背景a,a:hover,a:active,a:visited,a:link,a:focus{ -webkit-tap-highlight-color:rgba(0,0,0,0); -webkit-tap-highlight-color: transparent; outline:none; background: none; text-dec...原创 2019-07-26 09:46:39 · 319 阅读 · 0 评论 -
input内容从右侧输入,光标颜色修改,radio checkbox运用
input内容从右侧输入,input光标颜色修改,input单选框多选框radio checkbox运用,源码如下: <!-- 右侧输入,输入时光标在右 --> <input style="text-align:right" /> <!-- 右侧输入,输入时光标在左(在mpvue框架中不起作用) --> <input type="text" dir...原创 2019-07-04 17:14:01 · 781 阅读 · 0 评论