少学习多摸鱼
上一页 1 ··· 7 8 9 10 11 12 13 14 15 下一页
摘要: 操作bom对象 bom:浏览器对象模型 window对象,代表浏览器窗口 //window.alert(22) window.innerHeight //595 window.innerWidth //131 window.innerWidth //322 window.outerHeight // 阅读全文
posted @ 2022-12-01 22:21 北海之上 阅读(23) 评论(0) 推荐(0)
摘要: 内部对象 data日期内置函数 var now = new Date(); console.log(now);//打印当前时间 now.getFullYear()//年 now.getMonth()//月 now.getDate()//日 now.getDay()//星期几 now.getTime( 阅读全文
posted @ 2022-12-01 22:09 北海之上 阅读(32) 评论(0) 推荐(0)
摘要: 1.函数 定义函数: 正常定义 function abs(x){ if (x>=0){ return x; }else { return -x; } }//方式一 var定义 var abs2 =function (x){ console.log('x->'+x) for (var i =0;i<a 阅读全文
posted @ 2022-11-29 22:40 北海之上 阅读(19) 评论(0) 推荐(0)
摘要: 字符串 正常字符串使用单双引号包裹 转义字符\ ' \n \t \u4e2d(\u####) unicode字符 Ascll字符 多行字符串`` tab键上面的``包含多行字符 模板字符串 需要使用`` let name = "gugu" let age = 22; let masg = `hell 阅读全文
posted @ 2022-11-28 12:09 北海之上 阅读(27) 评论(0) 推荐(0)
摘要: JavaScript学习 1 script标签 在内部 <!-- script标签内,写js代码--> <!-- <script>--> <!-- alert('确定你是傻逼吗?');--> <!-- </script>--> 在外部引入 <script src="js/qj.js"></scrip 阅读全文
posted @ 2022-11-26 08:55 北海之上 阅读(29) 评论(0) 推荐(0)
摘要: 定位 默认形态例子 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Title</title> 6 <style> 7 div{ 8 margin: 10px; 9 padding: 5p 阅读全文
posted @ 2022-11-23 16:39 北海之上 阅读(27) 评论(0) 推荐(0)
摘要: 浮动 display block:块元素 inline: 行内元素 inline-block:是块元素但是可以行内内联 none:消失 1 <head> 2 <meta charset="UTF-8"> 3 <title>Title</title> 4 <style> 5 /* block:块元素 阅读全文
posted @ 2022-11-22 22:35 北海之上 阅读(24) 评论(0) 推荐(0)
摘要: 盒子模型 元素加padding border margin组成一个封装的盒子。可以设置外边距等操作对盒子进行一个设计 首先进行一个body对登录元素进行一个列表设计 1 <body> 2 <div id="box"> 3 <h2> 4 会员登陆 5 </h2> 6 <form action="#"> 阅读全文
posted @ 2022-11-19 09:51 北海之上 阅读(36) 评论(0) 推荐(0)
摘要: 1. span标签 没什么用 只是个名字 选中一段可以用 <body> ​ 欢迎学习 <span id="title1">java</span> </body> 2. 字体样式 font-family:字体样式 font-size:字体大小 font-weight:字体粗细 color:字体颜色 统 阅读全文
posted @ 2022-11-17 22:28 北海之上 阅读(28) 评论(0) 推荐(0)
摘要: 层次选择器 选择全部 *p{}所有该属性标签都会改变样式 1 p{ 2 background: #15f50c; 3 } 后代选择器 选择某一项的后代所有的该元素都改变样式 1 后代选择器 2 body p{ 3 background: aqua; 4 } 子选择器 只选择子代,子代之后的不做选择 阅读全文
posted @ 2022-11-16 20:05 北海之上 阅读(31) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 下一页
/* 粒子吸附*/