IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> JavaScript知识库 -> 2021-07-25 暑假学习1 -> 正文阅读

[JavaScript知识库]2021-07-25 暑假学习1

暑假学习
完善华为官网
/轮播图/
var ImgListLi = document.getElementsByClassName(“ImgListLi”);
var leftBtn = document.getElementsByClassName(“leftBtn”)[0];
var rightBtn = document.getElementsByClassName(“rightBtn”)[0];
var imglistT = document.getElementsByClassName(“imglistT”);
var index = 0;
var timer = setInterval(function() {
index++;
if (index >= 3) {
index = 0;
ImgListLi[2].style.opacity = “0”;
ImgListLi[0].style.opacity = “1”;
} else {
ImgListLi[index].style.opacity = “1”;
ImgListLi[index - 1].style.opacity = “0”;
}
for (var i = 0; i < 3; i++) {
imglistT[i].style.backgroundColor = “#dfdcd9”;
}
imglistT[index].style.backgroundColor = “#4e667”;
}, 3000);
leftBtn.onclick = function() {
clearInterval(timer);
index–;
if (index <= -1) {
index = 2;
ImgListLi[index].style.opacity = “1”;
ImgListLi[0].style.opacity = “0”;
} else {
ImgListLi[index].style.opacity = “1”;
ImgListLi[index + 1].style.opacity = “0”;
}
for (var i = 0; i < 3; i++) {
imglistT[i].style.backgroundColor = “#dfdcd9”;
}
imglistT[index].style.backgroundColor = “#4e667”;
timer = setInterval(function() {
index++;
if (index >= 3) {
index = 0;
ImgListLi[2].style.opacity = “0”;
ImgListLi[0].style.opacity = “1”;
} else {
ImgListLi[index].style.opacity = “1”;
ImgListLi[index - 1].style.opacity = “0”;
}
for (var i = 0; i < 3; i++) {
imglistT[i].style.backgroundColor = “#dfdcd9”;
}
imglistT[index].style.backgroundColor = “#4e6667”;
}, 4000);
}
rightBtn.onclick = function() {
clearInterval(timer);
index++;
if (index >= 3) {
index = 0;
ImgListLi[index].style.opacity = “1”;
ImgListLi[2].style.opacity = “0”;
} else {
ImgListLi[index].style.opacity = “1”;
ImgListLi[index - 1].style.opacity = “0”;
}
for (var i = 0; i < 3; i++) {
imglistT[i].style.backgroundColor = “#dfdcd9”;
}
imglistT[index].style.backgroundColor = “#4e6667”;
timer = setInterval(function() {
index++;
if (index >= 3) {
index = 0;
ImgListLi[2].style.opacity = “0”;
ImgListLi[0].style.opacity = “1”;
} else {
ImgListLi[index].style.opacity = “1”;
ImgListLi[index - 1].style.opacity = “0”;
}
for (var i = 0; i < 3; i++) {
imglistT[i].style.backgroundColor = “#dfdcd9”;
}
imglistT[index].style.backgroundColor = “#4e6667”;
}, 4000);
}
var inde;
for (var i = 0; i < 3; i++) {
imglistT[i].num = i;
imglistT[i].onclick = function() {
clearInterval(timer);
inde = this.num;
for (var e = 0; e < 3; e++) {
ImgListLi[e].style.opacity = “0”;

		}
		ImgListLi[inde].style.opacity = "1";
		for (var i = 0; i < 3; i++) {
			imglistT[i].style.backgroundColor = "#dfdcd9";
		}
		imglistT[inde].style.backgroundColor = "#4e6667";
		timer = setInterval(function() {
			index++;
			if (index >= 3) {
				index = 0;
				ImgListLi[2].style.opacity = "0";
				ImgListLi[0].style.opacity = "1";
			} else {
				ImgListLi[index].style.opacity = "1";
				ImgListLi[index - 1].style.opacity = "0";
			}
			for (var i = 0; i < 3; i++) {
				imglistT[i].style.backgroundColor = "#dfdcd9";
			}
			imglistT[index].style.backgroundColor = "#4e6667";
		}, 4000);
	}
}
bootstrap复习
Width auto:加边界是往里面扣掉的  流体容器

Width 100%:边界是往外加的 固定容器

小于768 auto
3.栅格系统
4.Lg具有阈值的概念
!!栅格源码分析
container-fix:用来清除浮动 继承清除浮动的属性
bootstrap下载安装
可以从 http://getbootstrap.com/ 上下载 Bootstrap 的最新版本。
Download Bootstrap:下载 Bootstrap。点击该按钮,您可以下载 Bootstrap CSS、JavaScript 和字体的预编译的压缩版本。不包含文档和最初的源代码文件。
Download Source:下载源代码。点击该按钮,您可以直接从 from 上得到最新的 Bootstrap LESS 和 JavaScript 源代码。
网格系统布局(grid)
采用网格布局的区域,称为"容器"(container)。容器内部采用网格定位的子元素,称为"项目"(item)。
《/div>

1

2

3

上面代码中,最外层的
元素就是容器,内层的三个
元素就是项目。

注意:项目只能是容器的顶层子元素,不包含项目的子元素,比如上面代码的

元素就不是项目。Grid 布局只对项目生效。
单元格
行和列的交叉区域,称为"单元格"(cell)。

正常情况下,n行和m列会产生n x m个单元格。比如,3行3列会产生9个单元格。

网格线
划分网格的线,称为"网格线"(grid line)。水平网格线划分出行,垂直网格线划分出列。

正常情况下,n行有n + 1根水平网格线,m列有m + 1根垂直网格线,比如三行就有四根水平网格线。
grid-row-gap属性设置行与行的间隔(行间距),grid-column-gap属性设置列与列的间隔(列间距)。

排版
Bootstrap 中定义了所有的 HTML 标题(h1 到 h6)的样式

我是标题1 h1

我是标题2 h2

我是标题3 h3

我是标题4 h4

我是标题5 h5
我是标题6 h6
表格 如果您想要一个只带有内边距(padding)和水平分割的基本表,请添加 class .table,如下面实例所示:

实例

基本的表格布局
名称城市
TanmayBangalore
SachinMumbai

Jq引入方式

自己调用自己的循环被称为递归
Bootstrap中移动优先

  JavaScript知识库 最新文章
ES6的相关知识点
react 函数式组件 & react其他一些总结
Vue基础超详细
前端JS也可以连点成线(Vue中运用 AntVG6)
Vue事件处理的基本使用
Vue后台项目的记录 (一)
前后端分离vue跨域,devServer配置proxy代理
TypeScript
初识vuex
vue项目安装包指令收集
上一篇文章      下一篇文章      查看所有文章
加:2021-07-26 11:59:24  更:2021-07-26 12:02:03 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2025年4日历 -2025/4/19 8:50:57-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码