핀터레스트 스타일 레이아웃

핀터레스트(Pinterest)와 유사하게 보여지는 UI ,

보여지는 것 보다 간단하게 css로 구현이 가능

 

 

 

CSS 코드

#columns {
	columns-width: 250px; /* 컬럼의 열 폭(실제 열 폭은 영역 크기에 따라 변화)*/
	column-count: 7; /* 컬럼의 열 수를 지정 */
	column-gap: 15px; /* 컬럼 사이의 간격 */
	column-rule-width: 2px; /* 컬럼을 구분하는 선의 굵기 */
	column-rule-style: dashed ; /* 컬럼을 구분하는 선의 종류 */
	column-rule-color: grey; /* 컬럼을 구분하는 선의 색깔 */
}

#columns figure {
	display: inline-block;
	border: 1px solid rgba(0, 0, 0, 0.2);
	margin: 0;
	margin-bottom: 15px;
	padding: 10px;
	box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

#columns figure img {
	width: 100%;
}

#columns figure figcaption {
	border-top: 1px solid rgba(0, 0, 0, 0.2);
	padding: 10px;
	margin-top: 11px;
}

 

 

 

HTML 코드

<div id="columns">
	<figure>
		<img src="https://i.pinimg.com/564x/f4/cc/56/f4cc569f892670502803c534ba148344.jpg">
		<figcaption>(1) Volvo released full photos and some new details today about its 2016 XC90, an important car for the company showcasing its new technology base.</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/d2/c1/d3/d2c1d37b2bbc018ea08c71f8f8ec2cfe.jpg">
		<figcaption>(2) Volvo XC 90 New</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/56/22/f7/5622f7debbb97f2d12aa5249c7ecb3d1.jpg">
		<figcaption>(3) 2018 XC60 Luxury SUV | Volvo Car USA</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/be/96/b1/be96b1ef507cd6250686913e28b07284.jpg">
		<figcaption>(4) Mind Blowing Package Tint on this Honda Civic!</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/94/03/ed/9403ed1e62953ff607abf02fcf1c6d1d.jpg">
		<figcaption>(5) 2021 Cadillac Escalade, All black beast seating on black Forgiato wheels.</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/83/4b/94/834b9423220fe8887d52f2cec2be1bfb.jpg">
		<figcaption>Got money to dump on a gargantuan, ostentatious vehicle? Are the regular Cadillac Escalade and extended Esc...</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/c9/dd/c5/c9ddc56ccc8d7b6993b361a2e0d41416.jpg">
		<figcaption>add armor b6 executive escalade action on road</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/1a/fd/ea/1afdea54b45dbe957a8f51d80618eccd.jpg">
		<figcaption>Up to 50% Off on Automotive Window Tinting at Ocean Auto Designs</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/80/b6/16/80b616bb57620c86d6e91ac1200dfaf9.jpg">
		<figcaption>Little bit country....Little bit city....No porn here......Still probably.....NSFW 18/21 and older only</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/92/0c/b7/920cb7bcf092bba80ed3ed6742f2f97f.jpg">
		<figcaption>Est. 2011</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/f4/cc/56/f4cc569f892670502803c534ba148344.jpg">
		<figcaption>(1) Volvo released full photos and some new details today about its 2016 XC90, an important car for the company showcasing its new technology base.</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/d2/c1/d3/d2c1d37b2bbc018ea08c71f8f8ec2cfe.jpg">
		<figcaption>(2) Volvo XC 90 New</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/56/22/f7/5622f7debbb97f2d12aa5249c7ecb3d1.jpg">
		<figcaption>(3) 2018 XC60 Luxury SUV | Volvo Car USA</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/be/96/b1/be96b1ef507cd6250686913e28b07284.jpg">
		<figcaption>(4) Mind Blowing Package Tint on this Honda Civic!</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/94/03/ed/9403ed1e62953ff607abf02fcf1c6d1d.jpg">
		<figcaption>(5) 2021 Cadillac Escalade, All black beast seating on black Forgiato wheels.</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/83/4b/94/834b9423220fe8887d52f2cec2be1bfb.jpg">
		<figcaption>Got money to dump on a gargantuan, ostentatious vehicle? Are the regular Cadillac Escalade and extended Esc...</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/c9/dd/c5/c9ddc56ccc8d7b6993b361a2e0d41416.jpg">
		<figcaption>add armor b6 executive escalade action on road</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/1a/fd/ea/1afdea54b45dbe957a8f51d80618eccd.jpg">
		<figcaption>Up to 50% Off on Automotive Window Tinting at Ocean Auto Designs</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/80/b6/16/80b616bb57620c86d6e91ac1200dfaf9.jpg">
		<figcaption>Little bit country....Little bit city....No porn here......Still probably.....NSFW 18/21 and older only</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/92/0c/b7/920cb7bcf092bba80ed3ed6742f2f97f.jpg">
		<figcaption>Est. 2011</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/f4/cc/56/f4cc569f892670502803c534ba148344.jpg">
		<figcaption>(1) Volvo released full photos and some new details today about its 2016 XC90, an important car for the company showcasing its new technology base.</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/d2/c1/d3/d2c1d37b2bbc018ea08c71f8f8ec2cfe.jpg">
		<figcaption>(2) Volvo XC 90 New</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/56/22/f7/5622f7debbb97f2d12aa5249c7ecb3d1.jpg">
		<figcaption>(3) 2018 XC60 Luxury SUV | Volvo Car USA</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/be/96/b1/be96b1ef507cd6250686913e28b07284.jpg">
		<figcaption>(4) Mind Blowing Package Tint on this Honda Civic!</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/94/03/ed/9403ed1e62953ff607abf02fcf1c6d1d.jpg">
		<figcaption>(5) 2021 Cadillac Escalade, All black beast seating on black Forgiato wheels.</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/83/4b/94/834b9423220fe8887d52f2cec2be1bfb.jpg">
		<figcaption>Got money to dump on a gargantuan, ostentatious vehicle? Are the regular Cadillac Escalade and extended Esc...</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/c9/dd/c5/c9ddc56ccc8d7b6993b361a2e0d41416.jpg">
		<figcaption>add armor b6 executive escalade action on road</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/1a/fd/ea/1afdea54b45dbe957a8f51d80618eccd.jpg">
		<figcaption>Up to 50% Off on Automotive Window Tinting at Ocean Auto Designs</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/80/b6/16/80b616bb57620c86d6e91ac1200dfaf9.jpg">
		<figcaption>Little bit country....Little bit city....No porn here......Still probably.....NSFW 18/21 and older only</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/92/0c/b7/920cb7bcf092bba80ed3ed6742f2f97f.jpg">
		<figcaption>Est. 2011</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/f4/cc/56/f4cc569f892670502803c534ba148344.jpg">
		<figcaption>(1) Volvo released full photos and some new details today about its 2016 XC90, an important car for the company showcasing its new technology base.</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/d2/c1/d3/d2c1d37b2bbc018ea08c71f8f8ec2cfe.jpg">
		<figcaption>(2) Volvo XC 90 New</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/56/22/f7/5622f7debbb97f2d12aa5249c7ecb3d1.jpg">
		<figcaption>(3) 2018 XC60 Luxury SUV | Volvo Car USA</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/be/96/b1/be96b1ef507cd6250686913e28b07284.jpg">
		<figcaption>(4) Mind Blowing Package Tint on this Honda Civic!</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/94/03/ed/9403ed1e62953ff607abf02fcf1c6d1d.jpg">
		<figcaption>(5) 2021 Cadillac Escalade, All black beast seating on black Forgiato wheels.</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/83/4b/94/834b9423220fe8887d52f2cec2be1bfb.jpg">
		<figcaption>Got money to dump on a gargantuan, ostentatious vehicle? Are the regular Cadillac Escalade and extended Esc...</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/c9/dd/c5/c9ddc56ccc8d7b6993b361a2e0d41416.jpg">
		<figcaption>add armor b6 executive escalade action on road</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/1a/fd/ea/1afdea54b45dbe957a8f51d80618eccd.jpg">
		<figcaption>Up to 50% Off on Automotive Window Tinting at Ocean Auto Designs</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/80/b6/16/80b616bb57620c86d6e91ac1200dfaf9.jpg">
		<figcaption>Little bit country....Little bit city....No porn here......Still probably.....NSFW 18/21 and older only</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/92/0c/b7/920cb7bcf092bba80ed3ed6742f2f97f.jpg">
		<figcaption>Est. 2011</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/f4/cc/56/f4cc569f892670502803c534ba148344.jpg">
		<figcaption>(1) Volvo released full photos and some new details today about its 2016 XC90, an important car for the company showcasing its new technology base.</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/d2/c1/d3/d2c1d37b2bbc018ea08c71f8f8ec2cfe.jpg">
		<figcaption>(2) Volvo XC 90 New</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/56/22/f7/5622f7debbb97f2d12aa5249c7ecb3d1.jpg">
		<figcaption>(3) 2018 XC60 Luxury SUV | Volvo Car USA</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/be/96/b1/be96b1ef507cd6250686913e28b07284.jpg">
		<figcaption>(4) Mind Blowing Package Tint on this Honda Civic!</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/94/03/ed/9403ed1e62953ff607abf02fcf1c6d1d.jpg">
		<figcaption>(5) 2021 Cadillac Escalade, All black beast seating on black Forgiato wheels.</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/83/4b/94/834b9423220fe8887d52f2cec2be1bfb.jpg">
		<figcaption>Got money to dump on a gargantuan, ostentatious vehicle? Are the regular Cadillac Escalade and extended Esc...</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/c9/dd/c5/c9ddc56ccc8d7b6993b361a2e0d41416.jpg">
		<figcaption>add armor b6 executive escalade action on road</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/1a/fd/ea/1afdea54b45dbe957a8f51d80618eccd.jpg">
		<figcaption>Up to 50% Off on Automotive Window Tinting at Ocean Auto Designs</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/80/b6/16/80b616bb57620c86d6e91ac1200dfaf9.jpg">
		<figcaption>Little bit country....Little bit city....No porn here......Still probably.....NSFW 18/21 and older only</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/92/0c/b7/920cb7bcf092bba80ed3ed6742f2f97f.jpg">
		<figcaption>Est. 2011</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/f4/cc/56/f4cc569f892670502803c534ba148344.jpg">
		<figcaption>(1) Volvo released full photos and some new details today about its 2016 XC90, an important car for the company showcasing its new technology base.</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/d2/c1/d3/d2c1d37b2bbc018ea08c71f8f8ec2cfe.jpg">
		<figcaption>(2) Volvo XC 90 New</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/56/22/f7/5622f7debbb97f2d12aa5249c7ecb3d1.jpg">
		<figcaption>(3) 2018 XC60 Luxury SUV | Volvo Car USA</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/be/96/b1/be96b1ef507cd6250686913e28b07284.jpg">
		<figcaption>(4) Mind Blowing Package Tint on this Honda Civic!</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/94/03/ed/9403ed1e62953ff607abf02fcf1c6d1d.jpg">
		<figcaption>(5) 2021 Cadillac Escalade, All black beast seating on black Forgiato wheels.</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/83/4b/94/834b9423220fe8887d52f2cec2be1bfb.jpg">
		<figcaption>Got money to dump on a gargantuan, ostentatious vehicle? Are the regular Cadillac Escalade and extended Esc...</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/c9/dd/c5/c9ddc56ccc8d7b6993b361a2e0d41416.jpg">
		<figcaption>add armor b6 executive escalade action on road</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/1a/fd/ea/1afdea54b45dbe957a8f51d80618eccd.jpg">
		<figcaption>Up to 50% Off on Automotive Window Tinting at Ocean Auto Designs</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/80/b6/16/80b616bb57620c86d6e91ac1200dfaf9.jpg">
		<figcaption>Little bit country....Little bit city....No porn here......Still probably.....NSFW 18/21 and older only</figcaption>
	</figure>

	<figure>
		<img src="https://i.pinimg.com/564x/92/0c/b7/920cb7bcf092bba80ed3ed6742f2f97f.jpg">
		<figcaption>Est. 2011</figcaption>
	</figure>
</div>