Gridzy.Gallery
ไลบรารี JavaScript

ประสบการณ์ถ่ายภาพที่น่าทึ่งที่สุดที่ฉันเคยเจอ ในที่สุดก็มีคนเข้าใจวิธีถ่ายภาพนี้แล้ว!

มิโล เปอร์ซิค – ผู้ใช้ห้องสมุด

ข้อมูลเชิงลึกอย่างรวดเร็ว

วิดีโอสอน 1 นาที

เรียนรู้สิ่งนี้ในเวลาเพียงนาทีเดียว:

การใช้งานพื้นฐาน

การกำหนดค่า

ตัวกรอง

รูปร่าง

ร่วมเฉลิมฉลองวัน
จูบคนที่คุณรัก
จงบริสุทธิ์กับตัวเอง
อย่าลืมความสนุก
สัมผัสธรรมชาติ

สไตล์คำบรรยาย

รูปแบบคำบรรยายที่กำหนดไว้ล่วงหน้าเพื่อการแก้ปัญหาที่ง่ายดายและรวดเร็ว

เลื่อนเมาส์ไปที่รูปภาพเพื่อดูรูปแบบคำบรรยายที่กำหนดค่าไว้ เล่นกับปุ่มและตัวเลือกสีเพื่อกำหนดค่ารูปแบบในตัวที่แสดง

แท็กและตัวกรอง

เพื่อแสดงภาพของคุณในรูปแบบที่มีโครงสร้างมากขึ้น

ระบบตัวกรองในตัวมีความยืดหยุ่นสูง ความจริงที่ว่ามีการใช้ตัวเลือก CSS สำหรับการกรองนั้นทำให้สามารถใช้ตัวกรองได้เกือบทุกประเภท

เข้ากันได้สูง

สามารถใช้งานได้กับไลท์บ็อกซ์มากมาย

รวมแกลเลอรีเข้ากับไลท์บ็อกซ์ใดๆ ก็ได้ โอกาสที่มันจะเข้ากันได้เกือบ 100% คลิกที่รูปภาพเพื่อดูไลท์บ็อกซ์ PhotoSwipe เป็นตัวอย่าง

มีบทความบล็อกพร้อมตัวอย่างโค้ดสำเร็จรูป:

มีความยืดหยุ่นสูง

ร่วมเฉลิมฉลองวัน
จูบคนที่คุณรัก
จงบริสุทธิ์กับตัวเอง
อย่าลืมความสนุก
สัมผัสธรรมชาติ

สร้างรูปแบบที่กำหนดเอง

หากคุณคุ้นเคยกับ CSS คุณสามารถกำหนดรูปแบบรายการในแกลเลอรีได้ตามต้องการ

CSS ของตัวอย่างที่แสดง:

/* CSS class: "gridzySkin-custom-sepia" */

@property --gridzySkin-custom-sepia--filter-sepia {
	initial-value: 1;
	inherits: true;
	syntax: "<number>";
}
@property --gridzySkin-custom-sepia--filter-contrast {
	initial-value: 1;
	inherits: true;
	syntax: "<number>";
}

.gridzySkin-custom-sepia > .gridzyItem {
	position: relative;
	overflow: unset;
	margin: -10px;
	border: 10px solid #fff;
	box-shadow: 1px 1px 5px rgba(0, 0, 0, .5);
	border-radius: 10px;
}

.gridzySkin-custom-sepia > .gridzyItem *:not(.gridzyCaption) {
	display: inline;
}

.gridzySkin-custom-sepia > .gridzyItem .gridzyCaption * {
	display: initial;
}

.gridzySkin-custom-sepia > .gridzyItem:nth-child(4n) {
	transform: rotate(-1deg);
}

.gridzySkin-custom-sepia > .gridzyItem:nth-child(4n+1) {
	transform: rotate(-.5deg);
}

.gridzySkin-custom-sepia > .gridzyItem:nth-child(4n+2) {
	transform: rotate(1deg);
}

.gridzySkin-custom-sepia > .gridzyItem:nth-child(4n+3) {
	transform: rotate(.5deg);
}

.gridzySkin-custom-sepia .gridzyImage {
	position: relative;
	vertical-align: middle;
	border-radius: 3px;

	--gridzySkin-custom-sepia--filter-sepia: 1;
	--gridzySkin-custom-sepia--filter-contrast: .7;
	filter: sepia(var(--gridzySkin-custom-sepia--filter-sepia)) contrast(var(--gridzySkin-custom-sepia--filter-contrast));
	transition: --gridzySkin-custom-sepia--filter-sepia .6s, --gridzySkin-custom-sepia--filter-contrast .6s;
}

.gridzySkin-custom-sepia > .gridzyItem:hover .gridzyImage {
	--gridzySkin-custom-sepia--filter-sepia: 0;
	--gridzySkin-custom-sepia--filter-contrast: 1;
}

.gridzySkin-custom-sepia .gridzyCaption {
	margin: 0;
	padding: .5em;
	position: absolute;
	z-index: 1;
	bottom: -.5em;
	top: auto;
	width: auto;
	max-width: calc(100% - 2em);
	height: fit-content;
	max-height: 100%;
	overflow: auto;
	box-sizing: border-box;
	background: rgba(238, 238, 238, .8);
	color: #000;
	box-shadow: 1px 1px 3px rgba(0, 0, 0, .3);
	opacity: 0;
	transition: opacity .3s;
}

.gridzySkin-custom-sepia > .gridzyItem:nth-child(3n) .gridzyCaption {
	transform: translateX(1000px) translateX(-50%) rotate(3deg);
}

.gridzySkin-custom-sepia > .gridzyItem:nth-child(3n+1) .gridzyCaption {
	transform: translateX(1000px) translateX(-50%) rotate(-3deg);
}

.gridzySkin-custom-sepia > .gridzyItem:nth-child(3n+2) .gridzyCaption {
	transform: translateX(1000px) translateX(-50%) rotate(-1deg);
}

.gridzySkin-custom-sepia > .gridzyItem:nth-child(5n) .gridzyCaption {
	left: calc(50% - 1000px);
}

.gridzySkin-custom-sepia > .gridzyItem:nth-child(5n+1) .gridzyCaption {
	left: calc(54% - 1000px);
}

.gridzySkin-custom-sepia > .gridzyItem:nth-child(5n+2) .gridzyCaption {
	left: calc(46% - 1000px);
}

.gridzySkin-custom-sepia > .gridzyItem:nth-child(5n+3) .gridzyCaption {
	left: calc(52% - 1000px);
}

.gridzySkin-custom-sepia > .gridzyItem:nth-child(5n+4) .gridzyCaption {
	left: calc(48% - 1000px);
}

.gridzySkin-custom-sepia > .gridzyItem:hover .gridzyCaption {
	opacity: 1;
}

ใช้ HTML ใด ๆ

คุณสามารถใช้ HTML ได้เกือบทุกประเภท แต่มีข้อจำกัดเพียงเล็กน้อย ตัวอย่างที่แสดงที่นี่ทั้งสองแบบให้ผลลัพธ์ทางภาพเหมือนกัน

ตัวอย่างที่ 1:

<ul class="gridzy gridzySkinClassic">
	<li>
		<a href="https://www.example.com/">
			<img class="gridzyImage" src="https://www.example.com/image1.jpg" />
			<span class="gridzyCaption">example caption 1</span>
		</a>
	</li>
	<li>
		<a href="https://www.example.com/">
			<img class="gridzyImage" src="https://www.example.com/image2.jpg" />
			<span class="gridzyCaption">example caption 2</span>
		</a>
	</li>
	...
</ul>

ตัวอย่างที่ 2:

<section class="gridzy gridzySkinClassic">
	<figure>
		<img class="gridzyImage" src="https://www.example.com/image1.jpg" />
		<figcaption class="gridzyCaption">example caption 1</figcaption>
	</figure>
	<figure>
		<img class="gridzyImage" src="https://www.example.com/image2.jpg" />
		<figcaption class="gridzyCaption">example caption 2</figcaption>
	</figure>
	...
</section>

คุณสมบัติที่มีประโยชน์มากขึ้น

การโหลดแบบขี้เกียจ

โหลดภาพที่คุณดูได้เร็วขึ้น

การดำเนินการนี้จะโหลดเฉพาะภาพที่อยู่ใกล้กับพื้นที่ที่มองเห็นได้เท่านั้น ดังนั้นจึงมีแบนด์วิดท์มากขึ้นสำหรับภาพที่มองเห็นได้

เอพีไอ

ช่วยให้คุณสามารถทำอะไรได้มากขึ้น

สิ่งนี้ช่วยให้คุณสามารถเพิ่มและลบรูปภาพตามโปรแกรม เปลี่ยนตัวเลือก หรือตอบสนองต่อเหตุการณ์ได้

ส่วนขยาย

มอบโซลูชันให้กับคุณสำหรับสถานการณ์เฉพาะ

เป็นคอลเลกชันบทความบล็อกที่เพิ่มขึ้นตามกาลเวลาและประกอบด้วยตัวอย่างโค้ดที่เป็นประโยชน์เพื่อขยาย Gridzy.Gallery ได้อย่างง่ายดาย

ผู้ใช้ เกี่ยวกับห้องสมุด

มาเริ่มทำธุรกิจกันเลย!

คลิกปุ่มเพื่อตรวจสอบแผนการ!