前端JS特效第24集:jquery css3实现瀑布流照片墙特效

jquery css3实现瀑布流照片墙特效,先来看看效果:

部分核心的代码如下(全部代码在文章末尾):

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>jquery+css3实现瀑布流照片墙特效 - php中文网</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<div class="content">
<center>
<br><br>
<b>适用浏览器:360、FireFox、Chrome、Safari、Opera、傲游、搜狗、世界之窗. 不支持IE8及以下浏览器。<br>
<br>来源:<a href="http://php.cn/" target="_blank">php中文网</a><b>
</center><div class="iw_wrapper"><ul class="iw_thumbs" id="iw_thumbs"><li><img src="images/1.jpg" data-img="images/1.jpg" alt="Thumb1"/><div><h2>Serenity</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/2.jpg" data-img="images/2.jpg" alt="Thumb2"/><div><h2>Silence</h2><p>Separated they live in Bookmarksgrove right at the coast of the Semantics.</p></div></li><li><img src="images/3.jpg" data-img="images/3.jpg" alt="Thumb3"/><div><h2>Abstraction</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/8.jpg" data-img="images/8.jpg" alt="Thumb8"/><div><h2>Happiness</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/9.jpg" data-img="images/9.jpg" alt="Thumb9"/><div><h2>Greatness</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/10.jpg" data-img="images/10.jpg" alt="Thumb10"/><div><h2>Abstraction</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/6.jpg" data-img="images/6.jpg" alt="Thumb6"/><div><h2>Virtue</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/7.jpg" data-img="images/7.jpg" alt="Thumb7"/><div><h2>Beauty</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/8.jpg" data-img="images/8.jpg" alt="Thumb8"/><div><h2>Happiness</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/12.jpg" data-img="images/12.jpg" alt="Thumb12"/><div><h2>Greatness</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/4.jpg" data-img="images/4.jpg" alt="Thumb4"/><div><h2>Attraction</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/5.jpg" data-img="images/5.jpg" alt="Thumb5"/><div><h2>Growth</h2><p>A small river named Duden flows by their place and supplies it with the necessary regelialia.</p></div></li><li><img src="images/6.jpg" data-img="images/6.jpg" alt="Thumb6"/><div><h2>Virtue</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/7.jpg" data-img="images/7.jpg" alt="Thumb7"/><div><h2>Beauty</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/10.jpg" data-img="images/10.jpg" alt="Thumb10"/><div><h2>Abstraction</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/11.jpg" data-img="images/11.jpg" alt="Thumb11"/><div><h2>Attraction</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/3.jpg" data-img="images/3.jpg" alt="Thumb3"/><div><h2>Virtue</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/13.jpg" data-img="images/13.jpg" alt="Thumb13"/><div><h2>Happiness</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/14.jpg" data-img="images/14.jpg" alt="Thumb14"/><div><h2>Serenity</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/2.jpg" data-img="images/2.jpg" alt="Thumb1"/><div><h2>Virtue</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/4.jpg" data-img="images/4.jpg" alt="Thumb2"/><div><h2>Serenity</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/11.jpg" data-img="images/11.jpg" alt="Thumb11"/><div><h2>Attraction</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/12.jpg" data-img="images/12.jpg" alt="Thumb12"/><div><h2>Virtue</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/13.jpg" data-img="images/13.jpg" alt="Thumb13"/><div><h2>Happiness</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/14.jpg" data-img="images/14.jpg" alt="Thumb14"/><div><h2>Serenity</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/2.jpg" data-img="images/2.jpg" alt="Thumb1"/><div><h2>Virtue</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/4.jpg" data-img="images/4.jpg" alt="Thumb2"/><div><h2>Serenity</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/6.jpg" data-img="images/6.jpg" alt="Thumb3"/><div><h2>Attraction</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/8.jpg" data-img="images/8.jpg" alt="Thumb4"/><div><h2>Serenity</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/12.jpg" data-img="images/12.jpg" alt="Thumb1"/><div><h2>Serenity</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/2.jpg" data-img="images/2.jpg" alt="Thumb2"/><div><h2>Silence</h2><p>Separated they live in Bookmarksgrove right at the coast of the Semantics.</p></div></li><li><img src="images/3.jpg" data-img="images/3.jpg" alt="Thumb3"/><div><h2>Abstraction</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/4.jpg" data-img="images/4.jpg" alt="Thumb4"/><div><h2>Attraction</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/5.jpg" data-img="images/5.jpg" alt="Thumb5"/><div><h2>Growth</h2><p>A small river named Duden flows by their place and supplies it with the necessary regelialia.</p></div></li><li><img src="images/6.jpg" data-img="images/6.jpg" alt="Thumb6"/><div><h2>Virtue</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/7.jpg" data-img="images/7.jpg" alt="Thumb7"/><div><h2>Beauty</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/8.jpg" data-img="images/8.jpg" alt="Thumb8"/><div><h2>Happiness</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/9.jpg" data-img="images/9.jpg" alt="Thumb9"/><div><h2>Greatness</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/10.jpg" data-img="images/10.jpg" alt="Thumb10"/><div><h2>Abstraction</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/11.jpg" data-img="images/11.jpg" alt="Thumb11"/><div><h2>Attraction</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/12.jpg" data-img="images/12.jpg" alt="Thumb11"/><div><h2>Attraction</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/13.jpg" data-img="images/13.jpg" alt="Thumb11"/><div><h2>Attraction</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/14.jpg" data-img="images/14.jpg" alt="Thumb11"/><div><h2>Attraction</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/16.jpg" data-img="images/16.jpg" alt="Thumb11"/><div><h2>Attraction</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/1.jpg" data-img="images/1.jpg" alt="Thumb12"/><div><h2>Virtue</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/13.jpg" data-img="images/13.jpg" alt="Thumb13"/><div><h2>Happiness</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/14.jpg" data-img="images/14.jpg" alt="Thumb14"/><div><h2>Serenity</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/2.jpg" data-img="images/2.jpg" alt="Thumb1"/><div><h2>Virtue</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/4.jpg" data-img="images/4.jpg" alt="Thumb2"/><div><h2>Serenity</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li><li><img src="images/6.jpg" data-img="images/6.jpg" alt="Thumb3"/><div><h2>Attraction</h2><p>Far far away, behind the word mountains there live the blind texts.</p></div></li></ul></div><div id="iw_ribbon" class="iw_ribbon"> <span class="iw_close"></span> <span class="iw_zoom">Click thumb to zoom</span> </div>
</div>
<script src="js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/jquery.masonry.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript">$(window).load(function(){var $iw_thumbs			= $('#iw_thumbs'),$iw_ribbon			= $('#iw_ribbon'),$iw_ribbon_close	= $iw_ribbon.children('span.iw_close'),$iw_ribbon_zoom		= $iw_ribbon.children('span.iw_zoom');ImageWall	= (function() {// window width and heightvar w_dim,// index of current imagecurrent				= -1,isRibbonShown		= false,isFullMode			= false,// ribbon / images animation settingsribbonAnim			= {speed : 500, easing : 'easeOutExpo'},imgAnim				= {speed : 400, easing : 'jswing'},// init function : call masonry, calculate window dimentions, initialize some eventsinit				= function() {$iw_thumbs.imagesLoaded(function(){$iw_thumbs.masonry({isAnimated	: true});});getWindowsDim();initEventsHandler();},// calculate window dimentionsgetWindowsDim		= function() {w_dim = {width	: $(window).width(),height	: $(window).height()};},// initialize some eventsinitEventsHandler	= function() {// click on a image$iw_thumbs.delegate('li', 'click', function() {if($iw_ribbon.is(':animated')) return false;var $el = $(this);if($el.data('ribbon')) {showFullImage($el);}else if(!isRibbonShown) {isRibbonShown = true;$el.data('ribbon',true);// set the currentcurrent = $el.index();showRibbon($el);}});// click ribbon close$iw_ribbon_close.bind('click', closeRibbon);// on window resize we need to recalculate the window dimentions$(window).bind('resize', function() {getWindowsDim();if($iw_ribbon.is(':animated'))return false;closeRibbon();}).bind('scroll', function() {if($iw_ribbon.is(':animated'))return false;closeRibbon();});},showRibbon			= function($el) {var	$img	= $el.children('img'),$descrp	= $img.next();// fadeOut all the other images$iw_thumbs.children('li').not($el).animate({opacity : 0.2}, imgAnim.speed);// increase the image z-index, and set the height to 100px (default height)$img.css('z-index', 100).data('originalHeight',$img.height()).stop().animate({height 		: '100px'}, imgAnim.speed, imgAnim.easing);// the ribbon will animate from the left or right// depending on the position of the imagevar ribbonCssParam 		= {top	: $el.offset().top - $(window).scrollTop() - 6 + 'px'},descriptionCssParam,dir;if( $el.offset().left < (w_dim.width / 2) ) {dir = 'left';ribbonCssParam.left 	= 0;ribbonCssParam.right 	= 'auto';}else {dir = 'right';ribbonCssParam.right 	= 0;ribbonCssParam.left 	= 'auto';}$iw_ribbon.css(ribbonCssParam).show().stop().animate({width : '100%'}, ribbonAnim.speed, ribbonAnim.easing, function() {switch(dir) {case 'left' :descriptionCssParam		= {'left' 			: $img.outerWidth(true) + 'px','text-align' 	: 'left'};break;case 'right' :	descriptionCssParam		= {'left' 			: '-200px','text-align' 	: 'right'};break;};$descrp.css(descriptionCssParam).fadeIn();// show close button and zoom$iw_ribbon_close.show();$iw_ribbon_zoom.show();});},// close the ribbon// when in full mode slides in the middle of the page// when not slides leftcloseRibbon			= function() {isRibbonShown 	= false$iw_ribbon_close.hide();$iw_ribbon_zoom.hide();if(!isFullMode) {// current wall imagevar $el	 		= $iw_thumbs.children('li').eq(current);resetWall($el);// slide out ribbon$iw_ribbon.stop().animate({width : '0%'}, ribbonAnim.speed, ribbonAnim.easing); }else {$iw_ribbon.stop().animate({opacity		: 0.8,height 		: '0px',marginTop	: w_dim.height/2 + 'px' // half of window height}, ribbonAnim.speed, function() {$iw_ribbon.css({'width'		: '0%','height'	: '126px','margin-top': '0px'}).children('img').remove();});isFullMode	= false;}},resetWall			= function($el) {var $img		= $el.children('img'),$descrp		= $img.next();$el.data('ribbon',false);// reset the image z-index and height$img.css('z-index',1).stop().animate({height 		: $img.data('originalHeight')}, imgAnim.speed,imgAnim.easing);// fadeOut the description$descrp.fadeOut();// fadeIn all the other images$iw_thumbs.children('li').not($el).animate({opacity : 1}, imgAnim.speed);								},showFullImage		= function($el) {isFullMode	= true;$iw_ribbon_close.hide();var	$img	= $el.children('img'),large	= $img.data('img'),// add a loading image on top of the image$loading = $('<span class="iw_loading"></span>');$el.append($loading);// preload large image$('<img/>').load(function() {var $largeImage	= $(this);$loading.remove();$iw_ribbon_zoom.hide();resizeImage($largeImage);// reset the current image in the wallresetWall($el);// animate ribbon in and out$iw_ribbon.stop().animate({opacity		: 1,height 		: '0px',marginTop	: '63px' // half of ribbons height}, ribbonAnim.speed, function() {// add the large image to the DOM$iw_ribbon.prepend($largeImage);$iw_ribbon_close.show();$iw_ribbon.animate({height 		: '100%',marginTop	: '0px',top			: '0px'}, ribbonAnim.speed);});}).attr('src',large);},resizeImage			= function($image) {var widthMargin		= 100,heightMargin 	= 100,windowH      	= w_dim.height - heightMargin,windowW      	= w_dim.width - widthMargin,theImage     	= new Image();theImage.src     	= $image.attr("src");var imgwidth     	= theImage.width,imgheight    	= theImage.height;if((imgwidth > windowW) || (imgheight > windowH)) {if(imgwidth > imgheight) {var newwidth 	= windowW,ratio 		= imgwidth / windowW,newheight 	= imgheight / ratio;theImage.height = newheight;theImage.width	= newwidth;if(newheight > windowH) {var newnewheight 	= windowH,newratio 		= newheight/windowH,newnewwidth 	= newwidth/newratio;theImage.width 		= newnewwidth;theImage.height		= newnewheight;}}else {var newheight 	= windowH,ratio 		= imgheight / windowH,newwidth 	= imgwidth / ratio;theImage.height = newheight;theImage.width	= newwidth;if(newwidth > windowW) {var newnewwidth 	= windowW,newratio 		= newwidth/windowW,newnewheight 	= newheight/newratio;theImage.height 	= newnewheight;theImage.width		= newnewwidth;}}}$image.css({'width'			: theImage.width + 'px','height'		: theImage.height + 'px','margin-left'	: -theImage.width / 2 + 'px','margin-top'	: -theImage.height / 2 + 'px'});							};return {init : init};	})();ImageWall.init();});</script>
</body>
</html>

全部代码:jquerycss3实现瀑布流照片墙特效

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/web/42011.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Nginx:负载均衡小专题

运维专题 Nginx&#xff1a;负载均衡小专题 - 文章信息 - Author: 李俊才 (jcLee95) Visit me at CSDN: https://jclee95.blog.csdn.netMy WebSite&#xff1a;http://thispage.tech/Email: 291148484163.com. Shenzhen ChinaAddress of this article:https://blog.csdn.net/…

在Conda环境中高效使用Kubernetes:跨平台容器化实践指南

摘要 Conda 是一个流行的跨平台包和环境管理器&#xff0c;广泛用于Python社区。而 Kubernetes 是一个开源的容器编排系统&#xff0c;用于自动化部署、扩展和管理容器化应用程序。本文将探讨如何在 Conda 环境中使用 Kubernetes&#xff0c;包括设置 Conda 环境、容器化应用程…

【专项刷题】— 位运算

常见类型介绍&#xff1a; & &#xff1a;有 0 就是 0 | &#xff1a;有 1 就是 1 ^ &#xff1a;相同为 0 &#xff0c;相异为 1 或者 无进位相加给定一个数确定它的二进制位的第x个数是0还是1&#xff1a;将一个数的二进制的第x位改成1&#xff1a;将一个数的二进制的第x…

Windows10/11家庭版开启Hyper-V虚拟机功能详解

Hyper-V是微软的一款虚拟机软件&#xff0c;可以使我们在一台Windows PC上&#xff0c;在虚拟环境下同时运行多个互相之间完全隔离的操作系统&#xff0c;这就实现了在Windows环境下运行Linux以及其他OS的可能性。和第三方虚拟机软件&#xff0c;如VMware等相比&#xff0c;Hyp…

Linux应用编程IO基础

Linux应用编程基本IO操作 一、main 函数1、main 函数写法之无传参2、main 函数写法之有传参 二、open 打开文件三、write 写文件四、read 读文件五、close 关闭文件六、 lseek七、 返回错误处理与 errno7.1 strerror 函数7.2 perror 函数 八、 exit、_exit、_Exit8.1_exit()和_…

零基础自学爬虫技术该从哪里入手?

零基础学习Python并不一定是困难的&#xff0c;这主要取决于个人的学习方法、投入的时间以及学习目标的设定。Python是一门相对容易入门的编程语言&#xff0c;它有着简洁的语法、丰富的库和广泛的应用领域&#xff08;如数据分析、Web开发、人工智能等&#xff09;&#xff0c…

大模型知识问答: 文本分块要点总结

节前&#xff0c;我们组织了一场算法岗技术&面试讨论会&#xff0c;邀请了一些互联网大厂朋友、今年参加社招和校招面试的同学。 针对大模型技术趋势、算法项目落地经验分享、新手如何入门算法岗、该如何准备面试攻略、面试常考点等热门话题进行了深入的讨论。 总结链接如…

C++ 信号量和锁的区别

网上关于信号量和锁的区别&#xff0c;写的比较官方晦涩难懂&#xff0c;对于这个知识点吸收难&#xff0c;通过示例&#xff0c;我们看到信号量&#xff0c;可以控制同一时刻的线程数量&#xff0c;就算同时开启很多线程&#xff0c;依然可以的达到线程数可控 #include <i…

初识c++(命名空间,缺省参数,函数重载)

一、命名空间 1、namespace的意义 在C/C中&#xff0c;变量、函数和后面要学到的类都是大量存在的&#xff0c;这些变量、函数和类的名称将都存在于全 局作用域中&#xff0c;可能会导致很多冲突。使用命名空间的目的是对标识符的名称进行本地化&#xff0c;以避免命名 冲突…

GEE代码实例教程详解:MODIS土地覆盖分类与面积计算

简介 在本篇博客中&#xff0c;我们将使用Google Earth Engine (GEE) 对MODIS土地覆盖数据进行分析。通过MODIS/061/MCD12Q1数据集&#xff0c;我们可以识别不同的土地覆盖类型&#xff0c;并计算每种类型的总面积。 背景知识 MODIS MCD12Q1数据集 MODIS/061/MCD12Q1是NASA…

每天一个数据分析题(四百十五)- 线性回归模型

线性回归模型中误差项的数学期望为 A. 0 B. 1 C. 2 D. 3 数据分析认证考试介绍&#xff1a;点击进入 题目来源于CDA模拟题库 点击此处获取答案 数据分析专项练习题库 内容涵盖Python&#xff0c;SQL&#xff0c;统计学&#xff0c;数据分析理论&#xff0c;深度学习&am…

世界商用飞机机型大全-使用Java抓取FlightAware后的答案

目录 前言 一、数据说明 1、实时航班飞机机型数据 2、网页结构分析 二、使用Java进行信息抓取 1、定义页面PageVO对象 2、爬取属性定义 3、启动信息抓取组件 三、成果分析 1、商业飞行的飞机机型的种类 2、飞机种类排名前十名 3、航班数排名后十名 4、看中国国产大飞…

【网络安全】一文带你了解什么是【网络劫持】

网络劫持&#xff08;Network Hijacking&#xff09;是一种网络攻击&#xff0c;攻击者通过非法手段劫持网络通信&#xff0c;导致合法用户的数据流被拦截、篡改或重定向到攻击者控制的系统。这种攻击可以在各种网络层面上进行&#xff0c;包括域名系统&#xff08;DNS&#xf…

你真的会信息收集嘛,4k字渗透测试信息收集10大技巧

前言 在渗透测试中&#xff0c;信息收集是非常关键的一步&#xff0c;它为后续的漏洞发现和利用提供了重要的基础。以下是非常详细的信息收集方式&#xff1a; 一、被动信息收集 被动信息收集是指在不与目标系统直接交互的情况下&#xff0c;通过公开渠道获取目标系统的相关…

基于51单片机的四路抢答器Protues仿真设计

一、设计背景 近年来随着科技的飞速发展&#xff0c;单片机的应用正在不断的走向深入。本文阐述了基于51单片机的八路抢答器设计。本设计中&#xff0c;51单片机充当了核心控制器的角色&#xff0c;通过IO口与各个功能模块相连接。按键模块负责检测参与者的抢答动作&#xff0c…

线程交互现象

线程交互现象 小明对自家的狗子有个规定,就是在狗狗还没吃完的时候,可以继续给他加饭 不好的解决方式 狗狗感觉一千年没吃饭了,狼吞虎咽起来,最后饭只剩下最后一点点,吃饭线程中使用while循环判断是否是1,如果是1那么就一直循环,知道加饭又重新回到了起点,这虽然是狗狗…

GEE代码实例教程详解:湖泊面积分析

GEE代码实例教程详解&#xff1a;湖泊面积分析 完整代码 // 定义研究区域的坐标点 var coordinates [[42.000552219688586, 38.18969302118053],[43.868228000938586, 38.18969302118053],[43.868228000938586, 39.209978258633186],[42.000552219688586, 39.20997825863318…

C++ --> 类和对象(一)

欢迎来到我的Blog&#xff0c;点击关注哦&#x1f495; 前言 前面讲到了C的入门需要学习的知识&#xff0c;是为了后面更好的学习。学习是不断深入的&#xff0c;内容是不断复杂的。笃定信心。 一、面向对象编程(OOP)和面向过程编程(POP)的认识 面向过程编程&#xff08;Proc…

力扣-贪心算法4

406.根据身高重建队列 406. 根据身高重建队列 题目 假设有打乱顺序的一群人站成一个队列&#xff0c;数组 people 表示队列中一些人的属性&#xff08;不一定按顺序&#xff09;。每个 people[i] [hi, ki] 表示第 i 个人的身高为 hi &#xff0c;前面 正好 有 ki 个身高大于或…

MyBatis的简介与使用

Mybatis JDBC操作数据库的缺点 存在大量的冗余代码。手工创建 Connection、Statement 等&#xff0c;效率低下。手工将结果集封装成实体对象。查询效率低&#xff0c;没有对数据访问进行优化。 Mybatis框架 简介 MyBatis 本是 apache 的一个开源项目 iBatis, 2010年这个项目由…