首页 > 其他分享 >jquery 瀑布流

jquery 瀑布流

时间:2023-05-30 16:34:06浏览次数:39  
标签:jquery 15 Description Title 0.3 网格 padding 瀑布


jquery 瀑布流_css

jquery 瀑布流_html_02

jquery 瀑布流_默认值_03

pinterest_grid.js

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<title>Title</title>
		<link rel="stylesheet" href="css/normalize.css">
		<link rel="stylesheet" type="text/css" href="css/default.css">
		<script src="js/jquery-3.5.1.min.js"></script>
		<script src="js/pinterest_grid.js"></script>
		<style type="text/css">
			#gallery-wrapper {
				position: relative;
				max-width: 75%;
				width: 75%;
				margin: 50px auto;
			}

			img.thumb {
				width: 100%;
				max-width: 100%;
				height: auto;
			}

			.white-panel {
				position: absolute;
				background: white;
				border-radius: 5px;
				box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3);
				padding: 10px;
			}

			.white-panel h1 {
				font-size: 1em;
			}

			.white-panel h1 a {
				color: #A92733;
			}

			.white-panel:hover {
				box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.5);
				margin-top: -5px;
				-webkit-transition: all 0.3s ease-in-out;
				-moz-transition: all 0.3s ease-in-out;
				-o-transition: all 0.3s ease-in-out;
				transition: all 0.3s ease-in-out;
			}
		</style>
	</head>
	<body>
		<section id="gallery-wrapper">
			<article class="white-panel">
				<img src="../pictures/2015.02.04-119.webp" class="thumb">
				<h1>
					<a href="#">我是奥特曼</a>
				</h1>
				<p>Description 1</p>
			</article>
			<article class="white-panel">
				<img src="../pictures/2015.01.09-228.webp" class="thumb">
				<h1>
					<a href="#">我是怪兽</a>
				</h1>
				<p>Description 2</p>
			</article>
			<article class="white-panel">
				<img src="../pictures/2015.05.25-335.webp" class="thumb">
				<h1>
					<a href="#">呃, 懒得写了</a>
				</h1>
				<p>Description 3</p>
			</article>
			<article class="white-panel">
				<img src="../pictures/2015.02.28-445.webp" class="thumb">
				<h1>
					<a href="#">Title 4</a>
				</h1>
				<p>Description 4</p>
			</article>
			<article class="white-panel">
				<img src="../pictures/2015.03.06-134.webp" class="thumb">
				<h1>
					<a href="#">Title 5</a>
				</h1>
				<p>Description 5</p>
			</article>
			<article class="white-panel">
				<img src="../pictures/2015.12.17-14.webp" class="thumb">
				<h1>
					<a href="#">Title 6</a>
				</h1>
				<p>Description 6</p>
			</article>
			<article class="white-panel">
				<img src="../pictures/2015.04.24-78.webp" class="thumb">
				<h1>
					<a href="#">Title 7</a>
				</h1>
				<p>Description 7</p>
			</article>
			<article class="white-panel">
				<img src="../pictures/2015.07.24-117.webp" class="thumb">
				<h1>
					<a href="#">Title 8</a>
				</h1>
				<p>Description 8</p>
			</article>
			<article class="white-panel">
				<img src="../pictures/2015.02.10-1170.webp" class="thumb">
				<h1>
					<a href="#">Title 9</a>
				</h1>
				<p>Description 9</p>
			</article>
			<article class="white-panel">
				<img src="../pictures/2015.10.29-126.webp" class="thumb">
				<h1>
					<a href="#">Title 10</a>
				</h1>
				<p>Description 10</p>
			</article>
			<article class="white-panel">
				<img src="../pictures/2015.01.08-551.webp" class="thumb">
				<h1>
					<a href="#">Title 11</a>
				</h1>
				<p>Description 11</p>
			</article>
			<article class="white-panel">
				<img src="../pictures/2015.02.14-1159.webp" class="thumb">
				<h1>
					<a href="#">Title 12</a>
				</h1>
				<p>Description 12</p>
			</article>
			<article class="white-panel">
				<img src="../pictures/2015.02.08-1271.webp" class="thumb">
				<h1>
					<a href="#">Title 13</a>
				</h1>
				<p>Description 13</p>
			</article>
			<article class="white-panel">
				<img src="../pictures/2015.02.06-1459.webp" class="thumb">
				<h1>
					<a href="#">Title 14</a>
				</h1>
				<p>Description 14</p>
			</article>
			<article class="white-panel">
				<img src="../pictures/2015.02.10-1259.webp" class="thumb">
				<h1>
					<a href="#">Title 15</a>
				</h1>
				<p>Description 15</p>
			</article>
			<article class="white-panel">
				<img src="../pictures/2015.02.10-1170.webp" class="thumb">
				<h1>
					<a href="#">Title 15</a>
				</h1>
				<p>Description 15</p>
			</article>
			<article class="white-panel">
				<img src="../pictures/2015.02.10-1259.webp" class="thumb">
				<h1>
					<a href="#">Title 15</a>
				</h1>
				<p>Description 15</p>
			</article>
			<article class="white-panel">
				<img src="../pictures/2015.02.11-1055.webp" class="thumb">
				<h1>
					<a href="#">Title 15</a>
				</h1>
				<p>Description 15</p>
			</article>
		</section>
	</body>
	<script type="text/javascript">
        $(function () {
            /*
    no_columns:网格布局一行的列数。默认值为一行3个网格。
    padding_x:网格在X轴方向的padding值。默认值为10像素。
    padding_y:网格在Y轴方向的padding值。默认值为10像素。
    margin_bottom:网格底部的margin值。默认值为50像素。
    single_column_breakpoint:指定在视口多大时一行只显示一个网格。
*/
            $("#gallery-wrapper").pinterest_grid({
                no_columns: 3,
                padding_x: 15,
                padding_y: 20,
                margin_bottom: 50,
                single_column_breakpoint: 700
            });
        });
	</script>
</html>


标签:jquery,15,Description,Title,0.3,网格,padding,瀑布
From: https://blog.51cto.com/u_16144724/6380368

相关文章

  • jquery 拷贝对象
    如果想要把某个对象拷贝(合并)给另外一个对象使用,此时可以使用$.extend()方法语法∶$.extend([deep],target,object1,[object])1.deep:如果设为true为深拷贝,默认为false浅拷贝2.target:要拷贝的目标对象3.object1:待拷贝到第一个对象的对象。案例:<!DOCTYPEhtml><htmllang=......
  • jquery自动触发事件
    <!DOCTYPEhtml><htmllang="en"> <head> <metacharset="UTF-8"> <title>Title</title> <scriptsrc="js/jquery-3.5.1.min.js"></script> <script>$(function......
  • jQuery 事件解绑
    事件.off([事件名][,[子元素名]])一次性事件:事件.one(),//用法同on<!DOCTYPEhtml><htmllang="en"> <head> <metacharset="UTF-8"> <title>Title</title> <scriptsrc="js/jquery-3.5.1.min.js"></sc......
  • jquery 创建,追加,删除节点
    <!DOCTYPEhtml><htmllang="en"> <head> <metacharset="UTF-8"> <title>Title</title> <scriptsrc="js/jquery-3.5.1.min.js"></script> </head> <body> <ul&g......
  • jquery 全选,反选复选框
    <!DOCTYPEhtml><htmllang="zh-CN"> <head> <metacharset="UTF-8"> <title>我的购物车-品优购</title> <linkrel="stylesheet"href="css/base.css"> <linkrel="styleshee......
  • 将ajax请求封装到jQuery库当中
    1. 手动把ajax封装到js库  28代码在com.bjpowernode.ajax.servletAjaxRequest10Servletpackagecom.bjpowernode.ajax.servlet;importjakarta.servlet.ServletException;importjakarta.servlet.annotation.WebServlet;importjakarta.servlet.http.HttpServlet;importja......
  • QT 绘制波形图、频谱图、瀑布图、星座图、眼图、语图
    说明最近在学中频信号处理的一些东西,顺便用QT写了一个小工具,可以显示信号的时域波形图、幅度谱、功率谱、二次方谱、四次方谱、八次方谱、瞬时包络、瞬时频率、瞬时相位、非线性瞬时相位、瞬时幅度直方图、瞬时频率直方图、瞬时相位直方图、眼图、星座图、语谱图、瀑布图。1.实......
  • QT 绘制波形图、频谱图、瀑布图、星座图、眼图、语图
    说明最近在学中频信号处理的一些东西,顺便用QT写了一个小工具,可以显示信号的时域波形图、幅度谱、功率谱、二次方谱、四次方谱、八次方谱、瞬时包络、瞬时频率、瞬时相位、非线性瞬时相位、瞬时幅度直方图、瞬时频率直方图、瞬时相位直方图、眼图、星座图、语谱图、瀑布图。目......
  • jQuery库的初次封装
    1.  AJAX代码封装  22-26- AJAX请求相关的代码都是类似的,有很多重复的代码,这些重复的代码能不能不写,能不能封装一个工具类。要发送ajax请求的话,就直接调用这个工具类中的相关函数即可。- 接下来,手动封装一个工具类,这个工具类我们可以把它看做是一个JS的库。我们把这个JS库起......
  • JQuery的认识和安装
    jQuery是一个JavaScript函数库。jQuery是一个轻量级的"写的少,做的多"的JavaScript库。jQuery库包含以下功能:HTML元素选取HTML元素操作CSS操作HTML事件函数JavaScript特效和动画HTMLDOM遍历和修改AJAXUtilities提示: 除此之外,jQuery还提供了大量的插......