- 博客(11)
- 收藏
- 关注
原创 随手记录1
HTML页面空格的替代符号名称编号描述  不断行的空白(1个字符宽度)  半个空白(1个字符宽度)  一个空白(2个字符宽度)  窄空白(小于1个字符宽度)...
2021-11-23 11:25:03 173
转载 JavaScript 判断字符串中是否包含某个字符串(五种方法)
String对象的方法方法一:indexOf() (推荐)var str ="123";console.log(str.indexof("3")!=-1);//trueindexof()方法可返回某个指定的字符串值在字符串中首次出现的位置。如果要检索的字符串值没有出现,则该方法返回-1。方法二:search()var str="123";console.log(str.search("3")!=-1);//truesearch()方法用于检索字符串中指定的子字符串,或检索与正则表
2021-11-17 09:27:37 34153 1
转载 JS自定义函数
原生JavaScript获取移动设备初始化大小function getInitZoom(){ if(!this._initZoom){ var screenWidth = Math.min(screen.height, screen.width); if(this.isAndroidMobileDevice() && !this.isNewChromeOnAndroid()){ screenWidth = screenWidth/window.devic
2021-11-16 17:28:34 146
转载 vue-table实现表单操作
vue-demo.html<!DOCTYPE html><html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns:v-bind="http://www.w3.org/1999/xhtml"><head> <meta charset="UTF-8"> <title>Title</title></head><link rel
2021-11-16 14:05:43 611
转载 Layui表单必填项自动打红色*号
一般的打星号写法:<span style="color:red">*</span>通过CSS更加规范统一整齐<style> .layui-input{height:30px;} /* layui-input 默认太高了,这里固定高度*/ label.required:after { /* 给红色的必填项打红色星号(文字后)如果打前面用before*/ content: ' *'; color: red;
2021-11-16 11:31:39 3774
转载 html固定表头,表单内容垂直循环滚动
<!DOCTYPE html><html lang="zh-cn"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>.
2021-11-13 10:09:25 343
原创 html5 video实现自适应宽度
.videoContent { background-color: rgb(40, 46, 83); width: 100%; height: 100%; } .videoElement { object-fit: fill; }<div class="videoContent"> <video class="videoElement" src="http://7xnzpx...
2021-11-10 15:40:19 6317
转载 CSS的水平居中与垂直居中
一、水平居中行内元素水平居中:指文本text、图像img、按钮超链接等只需给父元素设置text-align:center即可实现.center{ text-align:center;}<div class="center">水平居中</div>块级元素水平居中:指div标签等只需给需要居中的块级元素设置margin:0 auto即可,但宽度width值一定要有.center{ width:200px; margin:0 auto;...
2021-11-10 15:02:51 1176
转载 JS从字符串中截取出年、月、日、时、分、秒
<script type="text/javascript">function captureTime(){ var fullTime = "2020-12-11 14:54:48"; // 日期字符串 console.log(fullTime + '----'); var timeArr = fullTime.replace(" ", ":").replace(/\:/g, "-").split("-"); var nian = timeArr[0]; ...
2021-11-10 14:53:52 6115
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人