Skip to content

Instantly share code, notes, and snippets.

@daniilgri
Created August 6, 2019 06:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daniilgri/9699ee7645e25c7542840064d1c11a94 to your computer and use it in GitHub Desktop.
Save daniilgri/9699ee7645e25c7542840064d1c11a94 to your computer and use it in GitHub Desktop.
.towns
padding: 50px
@media screen and (max-width: 435px)
padding-left: 15px
padding-right: 15px
&-content
margin-left: auto
margin-right: auto
max-width: 1115px
&_cards
margin: -30px
display: flex
flex-flow: row wrap
@media screen and (max-width: 1024px)
margin: -10px
&__card
margin: 30px
flex: 1 1 25%
@media screen and (max-width: 1024px)
margin: 10px
@media screen and (max-width: 768px)
flex: 1 1 40%
img
height: auto
width: 100%
&_label
padding: 35px 20px
background-color: #FC9D96
box-shadow: 0px 4px 4px rgba(0,0,0,0.15)
color: #fff
h3
text-align: center
<div className="towns">
<div className="towns-content">
<div className="towns-content_cards">
<div className="towns-content_cards__card">
<img src="/static/4screen/foto1.png" />
<div className="towns-content_cards__card_label">
<h3>Токио</h3>
<p>В Японии начинается сезон сакуры "блабла" lorem chick</p>
</div>
</div>
<div className="towns-content_cards__card">
<img src="/static/4screen/foto2.png" />
<div className="towns-content_cards__card_label">
<h3>Токио</h3>
<p>В Японии начинается сезон сакуры "блабла" lorem chick</p>
</div>
</div>
<div className="towns-content_cards__card">
<img src="/static/4screen/foto3.png" />
<div className="towns-content_cards__card_label">
<h3>Токио</h3>
<p>В Японии начинается сезон сакуры "блабла" lorem chick</p>
</div>
</div>
<div className="towns-content_cards__card">
<img src="/static/4screen/foto4.png" />
<div className="towns-content_cards__card_label">
<h3>Токио</h3>
<p>В Японии начинается сезон сакуры "блабла" lorem chick</p>
</div>
</div>
<div className="towns-content_cards__card">
<img src="/static/4screen/foto5.png" />
<div className="towns-content_cards__card_label">
<h3>Токио</h3>
<p>В Японии начинается сезон сакуры "блабла" lorem chick</p>
</div>
</div>
<div className="towns-content_cards__card">
<img src="/static/4screen/foto6.png" />
<div className="towns-content_cards__card_label">
<h3>Токио</h3>
<p>В Японии начинается сезон сакуры "блабла" lorem chick</p>
</div>
</div>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment