R
R
Roma Zvarich2018-05-24 13:25:32
css
Roma Zvarich, 2018-05-24 13:25:32

How does Google mobile implement gradient hiding content outside of a block?

Hello.
In the mobile version of Google search, bookmarks that don't fit on the screen are styled as fade-outs, making it clear that there are more outside the box.
I am an amateur in these matters, it was not possible to understand how they did it.
Important : I'm interested in exactly the way that was used on this page to implement the hiding gradient
5b069308432f6072064886.jpeg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
tyzberd, 2018-05-24
@hisbvdis

something like this https://codepen.io/anon/pen/yjWEWV/
just look with a touch

A
Anton, 2018-05-24
@Eridani

Calculate block width, calculate screen width. If the block width is higher than the screen width, then hang the necessary, like a scroll, overflow or slider initialization

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question