{"id":72433,"date":"2024-07-31T18:00:40","date_gmt":"2024-07-31T10:00:40","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=72433"},"modified":"2024-08-07T19:39:11","modified_gmt":"2024-08-07T11:39:11","slug":"css-scroll-snap","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/css-scroll-snap\/","title":{"rendered":"Snappy Scroll with CSS Scroll Snap"},"content":{"rendered":"<p><strong>CSS Scroll Snap<\/strong> was introduced to allow you to define snap points for scrollable elements. It ensures that the scrolling lands precisely at the desired points.<\/p>\n<p>This new CSS feature is especially useful for creating carousels, slideshows, or any layout where you want to control the user\u2019s scrolling experience. Let\u2019s see how it works.<\/p>\n<h2>New Properties<\/h2>\n<p>The <strong>CSS Scroll Snap<\/strong> module introduces two main new properties to give us more control of the scrolling behavior:<\/p>\n<ul>\n<li><code>scroll-snap-type<\/code>: This property is applied to the container element to define the snapping behavior. It can be set to <code>x<\/code>, <code>y<\/code>, or <code>both<\/code> to specify the axis of snapping. It also takes a second argument which can be set to <code>mandatory<\/code> or <code>proximity<\/code>. The <code>mandatory<\/code> value forces the scroll to snap to the nearest snap point, while <code>proximity<\/code> allows the scroll to stop at any point within the snap area.<\/li>\n<li><code>scroll-snap-align<\/code>: This property is applied to the scrollable elements within the container to define the snap points. It can be set to <code>start<\/code>, <code>center<\/code>, or <code>end<\/code> to specify where the element should snap to the container. It can also be set to <code>none<\/code> to disable snapping for a specific element.<\/li>\n<\/ul>\n<h2>Creating Carousel<\/h2>\n<p>First, let\u2019s say we want to create a horizontal carousel of images. We want each image to slide and immediately snap into place as we scroll it. First, we place the HTML, as follows:<\/p>\n<pre>\r\n&lt;div class=\"carousel\"&gt;\r\n    &lt;div class=\"slide\"&gt;\r\n        &lt;img src=\"\/image-1.jpg\" width=\"600\" height=\"400\" \/&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div class=\"slide\"&gt;\r\n        &lt;img src=\"\/image-2.jpg\" width=\"600\" height=\"400\" \/&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div class=\"slide\"&gt;\r\n        &lt;img src=\"\/image-3.jpg\" width=\"600\" height=\"400\" \/&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div class=\"slide\"&gt;\r\n        &lt;img src=\"\/image-4.jpg\" width=\"600\" height=\"400\" \/&gt;\r\n    &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>As well as the styles.<\/p>\n<pre>\r\n.carousel {\r\n    display: flex;\r\n    overflow-x: scroll;\r\n    scroll-snap-type: x mandatory;\r\n}\r\n\r\n.image {\r\n    flex: 0 0 100%;\r\n    scroll-snap-align: center;\r\n    \r\n    \/* Stylistic elements *\/\r\n    width: 100%;\r\n    height: 100vh;\r\n    display: flex;\r\n    align-items: center;\r\n    justify-content: center;\r\n    font-size: 2rem;\r\n    background-color: #dddddd;\r\n}\r\n<\/pre>\n<p>In this example, we set the <code>scroll-snap-type<\/code> property to <code>x mandatory<\/code> on the <code>.carousel<\/code> container, indicating that the scroll snapping should happen horizontally and be mandatory. We also set the <code>scroll-snap-align<\/code> property to <code>center<\/code> on the <code>.image<\/code> elements, meaning each image will snap to the center of the container as you scroll.<\/p>\n<p class=\"codepen\" data-height=\"450\" data-default-tab=\"result\" data-slug-hash=\"NWZdvOr\" data-pen-title=\"Scroll Snap\" data-user=\"hkdc\" style=\"height: 450px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;\"><span>See the Pen <a href=\"https:\/\/codepen.io\/hkdc\/pen\/NWZdvOr\" rel=\"nofollow\">Scroll Snap<\/a> by HONGKIAT (<a href=\"https:\/\/codepen.io\/hkdc\" rel=\"nofollow\">@hkdc<\/a>)on <a href=\"https:\/\/codepen.io\" rel=\"nofollow\">CodePen<\/a>.<\/span><\/p>\n<p>To make it scroll vertically, we can simply set the <code>scroll-snap-type<\/code> value to <code>y<\/code>, and change the direction of our Flex layout so each element would stack vertically.<\/p>\n<pre>\r\n.carousel {\r\n    display: flex;\r\n    flex-direction: column;\r\n    overflow-y: scroll;\r\n    height: 100vh;\r\n    scroll-snap-type: y mandatory;\r\n}\r\n\r\n\/* ...Remaining code... *\/\r\n<\/pre>\n<p>Now, let\u2019s scroll vertically.<\/p>\n<p class=\"codepen\" data-height=\"600\" data-default-tab=\"result\" data-slug-hash=\"poXRWaK\" data-pen-title=\"Scroll Snap (Vertical)\" data-user=\"hkdc\" style=\"height: 600px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;\"><span>See the Pen <a href=\"https:\/\/codepen.io\/hkdc\/pen\/poXRWaK\" rel=\"nofollow\">Scroll Snap (Vertical)<\/a> by HONGKIAT (<a href=\"https:\/\/codepen.io\/hkdc\" rel=\"nofollow\">@hkdc<\/a>) on <a href=\"https:\/\/codepen.io\" rel=\"nofollow\">CodePen<\/a>.<\/span><\/p>\n<h2>Browser Support<\/h2>\n<table>\n<thead>\n<tr>\n<th>Browser<\/th>\n<th>Desktop Version<\/th>\n<th>Mobile Version<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Google Chrome<\/td>\n<td>69 and later<\/td>\n<td>127 and later<\/td>\n<\/tr>\n<tr>\n<td>Mozilla Firefox<\/td>\n<td>68 and later<\/td>\n<td>68 and later<\/td>\n<\/tr>\n<tr>\n<td>Safari<\/td>\n<td>11 and later<\/td>\n<td>11 and later<\/td>\n<\/tr>\n<tr>\n<td>Microsoft Edge<\/td>\n<td>79 and later<\/td>\n<td>79 and later<\/td>\n<\/tr>\n<tr>\n<td>Opera<\/td>\n<td>64 and later<\/td>\n<td>80 and later<\/td>\n<\/tr>\n<tr>\n<td>Internet Explorer<\/td>\n<td>Not supported<\/td>\n<td>Not supported<\/td>\n<\/tr>\n<tr>\n<td>Samsung Internet<\/td>\n<td>N\/A<\/td>\n<td>10.1 and later<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Wrapping up<\/h2>\n<p>CSS Scroll Snap is a powerful tool for creating smooth and controlled scrolling experiences. Whether you\u2019re building a carousel, a slideshow, or any scrollable layout, you can now create the perfect scrolling effect without any JavaScript added.<\/p>\n<p>In this article, we\u2019ve only touched the very basic implementations. There are a lot more creative ways we can leverage <strong>CSS Scroll Snap<\/strong>. Here are some of them for your inspiration.<\/p>\n<h3>CSS-only Carousel<\/h3>\n<p>Our carousel created in this article is pretty basic. The following demo shows how you can add controls like buttons and pagination into the carousel, all without any JavaScript involved.<\/p>\n<p class=\"codepen\" data-height=\"600\" data-default-tab=\"result\" data-slug-hash=\"WNbQByE\" data-pen-title=\"A CSS-only Carousel Slider\" data-user=\"Schepp\" style=\"height: 600px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;\"><span>See the Pen <a href=\"https:\/\/codepen.io\/Schepp\/pen\/WNbQByE\" rel=\"nofollow\">A CSS-only Carousel Slider<\/a> by Christian Schaefer (<a href=\"https:\/\/codepen.io\/Schepp\" rel=\"nofollow\">@Schepp<\/a>)on <a href=\"https:\/\/codepen.io\" rel=\"nofollow\">CodePen<\/a>.<\/span><\/p>\n<h3>Animated Verbs<\/h3>\n<p>Similar to what we created here, but with more vibrant colors, added with animated text.<\/p>\n<p class=\"codepen\" data-height=\"600\" data-default-tab=\"result\" data-slug-hash=\"MWgbqON\" data-pen-title=\"Animated Verbs\" data-user=\"hexagoncircle\" style=\"height: 600px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;\"><span>See the Pen <a href=\"https:\/\/codepen.io\/hexagoncircle\/pen\/MWgbqON\" rel=\"nofollow\">Animated Verbs<\/a> by Ryan Mulligan (<a href=\"https:\/\/codepen.io\/hexagoncircle\" rel=\"nofollow\">@hexagoncircle<\/a>)on <a href=\"https:\/\/codepen.io\" rel=\"nofollow\">CodePen<\/a>.<\/span><\/p>\n<h3>Digital Walls<\/h3>\n<p>Creative use of grid layouts combined with CSS Scroll Snap on each column.<\/p>\n<p class=\"codepen\" data-height=\"600\" data-default-tab=\"result\" data-slug-hash=\"gOmMgpx\" data-pen-title=\"Modern Blog Layout with CSS Grid\" data-user=\"TurkAysenur\" style=\"height: 600px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;\"> <span>See the Pen <a href=\"https:\/\/codepen.io\/TurkAysenur\/pen\/gOmMgpx\" rel=\"nofollow\"> Modern Blog Layout with CSS Grid<\/a> by Aysenur Turk (<a href=\"https:\/\/codepen.io\/TurkAysenur\" rel=\"nofollow\">@TurkAysenur<\/a>)\n  on <a href=\"https:\/\/codepen.io\" rel=\"nofollow\">CodePen<\/a>.<\/span><\/p>\n<p><script async src=\"https:\/\/cpwebassets.codepen.io\/assets\/embed\/ei.js\"><\/script> <\/p>","protected":false},"excerpt":{"rendered":"<p>CSS Scroll Snap was introduced to allow you to define snap points for scrollable elements. It ensures that the scrolling lands precisely at the desired points. This new CSS feature is especially useful for creating carousels, slideshows, or any layout where you want to control the user\u2019s scrolling experience. Let\u2019s see how it works. New&hellip;<\/p>\n","protected":false},"author":113,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3392],"tags":[507,4683],"topic":[],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Snappy Scroll with CSS Scroll Snap - Hongkiat<\/title>\n<meta name=\"description\" content=\"CSS Scroll Snap was introduced to allow you to define snap points for scrollable elements. It ensures that the scrolling lands precisely at the desired\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/css-scroll-snap\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Snappy Scroll with CSS Scroll Snap\" \/>\n<meta property=\"og:description\" content=\"CSS Scroll Snap was introduced to allow you to define snap points for scrollable elements. It ensures that the scrolling lands precisely at the desired\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/css-scroll-snap\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2024-07-31T10:00:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-07T11:39:11+00:00\" \/>\n<meta name=\"author\" content=\"Thoriq Firdaus\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@tfirdaus\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Thoriq Firdaus\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css-scroll-snap\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css-scroll-snap\\\/\"},\"author\":{\"name\":\"Thoriq Firdaus\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\"},\"headline\":\"Snappy Scroll with CSS Scroll Snap\",\"datePublished\":\"2024-07-31T10:00:40+00:00\",\"dateModified\":\"2024-08-07T11:39:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css-scroll-snap\\\/\"},\"wordCount\":551,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"keywords\":[\"CSS\",\"CSS Selectors\"],\"articleSection\":[\"Coding\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css-scroll-snap\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css-scroll-snap\\\/\",\"name\":\"Snappy Scroll with CSS Scroll Snap - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"datePublished\":\"2024-07-31T10:00:40+00:00\",\"dateModified\":\"2024-08-07T11:39:11+00:00\",\"description\":\"CSS Scroll Snap was introduced to allow you to define snap points for scrollable elements. It ensures that the scrolling lands precisely at the desired\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css-scroll-snap\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css-scroll-snap\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css-scroll-snap\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Snappy Scroll with CSS Scroll Snap\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\",\"name\":\"Thoriq Firdaus\",\"description\":\"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.\",\"sameAs\":[\"https:\\\/\\\/thoriq.com\",\"https:\\\/\\\/x.com\\\/tfirdaus\"],\"jobTitle\":\"Web Developer\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/thoriq\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Snappy Scroll with CSS Scroll Snap - Hongkiat","description":"CSS Scroll Snap was introduced to allow you to define snap points for scrollable elements. It ensures that the scrolling lands precisely at the desired","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/css-scroll-snap\/","og_locale":"en_US","og_type":"article","og_title":"Snappy Scroll with CSS Scroll Snap","og_description":"CSS Scroll Snap was introduced to allow you to define snap points for scrollable elements. It ensures that the scrolling lands precisely at the desired","og_url":"https:\/\/www.hongkiat.com\/blog\/css-scroll-snap\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2024-07-31T10:00:40+00:00","article_modified_time":"2024-08-07T11:39:11+00:00","author":"Thoriq Firdaus","twitter_card":"summary_large_image","twitter_creator":"@tfirdaus","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Thoriq Firdaus","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/css-scroll-snap\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/css-scroll-snap\/"},"author":{"name":"Thoriq Firdaus","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807"},"headline":"Snappy Scroll with CSS Scroll Snap","datePublished":"2024-07-31T10:00:40+00:00","dateModified":"2024-08-07T11:39:11+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/css-scroll-snap\/"},"wordCount":551,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"keywords":["CSS","CSS Selectors"],"articleSection":["Coding"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/css-scroll-snap\/","url":"https:\/\/www.hongkiat.com\/blog\/css-scroll-snap\/","name":"Snappy Scroll with CSS Scroll Snap - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"datePublished":"2024-07-31T10:00:40+00:00","dateModified":"2024-08-07T11:39:11+00:00","description":"CSS Scroll Snap was introduced to allow you to define snap points for scrollable elements. It ensures that the scrolling lands precisely at the desired","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/css-scroll-snap\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/css-scroll-snap\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/css-scroll-snap\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Snappy Scroll with CSS Scroll Snap"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807","name":"Thoriq Firdaus","description":"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.","sameAs":["https:\/\/thoriq.com","https:\/\/x.com\/tfirdaus"],"jobTitle":"Web Developer","url":"https:\/\/www.hongkiat.com\/blog\/author\/thoriq\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-iQh","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/72433","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/113"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=72433"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/72433\/revisions"}],"predecessor-version":[{"id":72525,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/72433\/revisions\/72525"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=72433"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=72433"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=72433"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=72433"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}