前端
huangkang1995
这个作者很懒,什么都没留下…
展开
-
同局域网 手机访问本地服务器
同局域网 手机访问本地服务器原创 2022-06-10 17:03:28 · 2461 阅读 · 0 评论 -
HTML5 window.postMessage跨域通信
window.postMessage 解决跨域通信问题首要条件两个域名我们都可以控制 或者 另外的域名有对应的通信接口示例a.html 为主页面<iframe src="xxx/b.html"></iframe><script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/3.1.0/jquery-3.1.0.min.js"></script><script>原创 2021-10-16 13:44:53 · 238 阅读 · 0 评论 -
youtube 视频引用问题 [隐藏标题和yt 图标]
youtube 视频引用问题 [隐藏标题和yt 图标]官方文档下面的代码做到了自动播放视频循环播放视频隐藏YT图标和视频标题<script src="../../js/jquery-1.7.2.min.js"></script><style> .iframeVideoBox{ position: relative;padding-bottom: 56.4%;overflow: hidden;} .iframeVideoBox iframe{ p原创 2021-08-24 20:39:21 · 1060 阅读 · 0 评论 -
slick轮播插件操作 记录
slick轮播插件操作 记录插件说明文档官方文档https://kenwheeler.github.io/slick/中文文档https://www.cnblogs.com/chalkbox/p/13159637.html基础使用<style>.aa{ display:flex; flex-wrap: nowrap;}.aa .aa-item{width:calc(25% - 18px); margin-left:24px;margin-bottom: 32px; backgr原创 2021-08-12 16:09:37 · 447 阅读 · 0 评论 -
js 设置cookie
js 设置cookie<script>function setOurCookie(){ var our_cookie_name="设置的cookie名"; var Days = 300; // 时间长度 var exp = new Date(); exp.setTime(exp.getTime() + Days*24*60*60*1000); document.cookie = our_cookie_name+"=true;expires="+exp.toGMTString(原创 2021-04-25 13:48:10 · 6098 阅读 · 0 评论 -
require.js 的初级使用 require-config 配置的小坑
require.js 的初级使用官方文档初接触 require.js错误逻辑<script src="/js/require/require-2.3.6.js" data-main="/js/require/require-config"></script><div class="bb">bbb</div><script>require(["jquery"],function($){ console.log($(".bb").ht原创 2021-01-29 15:15:16 · 780 阅读 · 0 评论 -
CSS布局:sticky定位 position:sticky
CSS布局:sticky定位 position:sticky转载 https://www.cnblogs.com/byeyear/p/11999334.htmlstick定位一如其名:它随“正常”文档流而动,直到规定位置,尔后“粘”在那里;或者,当它发现自己可以跟随“正常”文档流而脱离sticky位置时,就果断离开从而加入文档流。示例<div style="height: 200px; overflow:scroll;"> <p style="background-co原创 2020-11-28 09:47:46 · 1330 阅读 · 0 评论 -
前端页面关闭事件 beforeunload
前端页面关闭事件 beforeunload页面加载时只执行onload页面关闭时先执行onbeforeunload,最后onunload页面刷新时先执行onbeforeunload,然后onunload,最后onload。beforeunload// jswindow.onbeforeunload = function(){ console.log("onbeforeunload"); return "提示语"; }// jq$(window).on("beforeunlo原创 2020-11-23 17:25:25 · 12319 阅读 · 0 评论 -
Performance — 前端性能监控利器 使用示例
Performance — 前端性能监控利器 使用示例转载 https://blog.csdn.net/blueblueskyhua/article/details/78830692Performance 方法详解 可点击此处查看还记得在我上一家公司中,某一大佬做了一个监控系统,牛逼哄哄,挺想研究他到底是怎么搞出来的。当然我们也不是拍拍脑袋干活的人,总不能人家咋干我们就咋干。下面先就介绍下,这样的平台到底有啥好处。背景首先我们为什么要做前端系统呢,先看下面这张表,可以很显然的看出,前端的性能对于产转载 2020-11-20 10:30:25 · 556 阅读 · 0 评论 -
Performance — 前端性能监控利器 方法详解
转载 https://www.cnblogs.com/bldxh/p/6857324.html最近在写一个监控脚本,终于有机会接触到了这一块,整理后写下了本文。Performance是一个做前端性能监控离不开的API,最好在页面完全加载完成之后再使用,因为很多值必须在页面完全加载之后才能得到。最简单的办法是在window.onload事件中读取各种数据。属性timing (PerformanceTiming)从输入url到用户可以使用页面的全过程时间统计,会返回一个PerformanceTimin转载 2020-11-20 10:17:11 · 1120 阅读 · 1 评论 -
雪花飘落 css版
雪花飘落 css版//雪花下落的速度snowflake.speed = [8,10];速度为区间数值的随机数/使用setInterval定时器每800毫秒创建一个雪花/setInterval(“snowflake.snowflakeAdd()”,80);雪花飘落的频率可以自己设置完整代码如下jq链接记得替换下<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" />原创 2020-10-20 10:35:54 · 344 阅读 · 1 评论 -
雪花飘落 jq版
雪花飘落 js版<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" /> <title>雪花下落</title></head><script src="../js/jquery-1.7.2.min.js"></script><style>*{padding: 0;margin: 0;}bod原创 2020-10-20 10:32:31 · 258 阅读 · 1 评论