Telegram Group & Telegram Channel
⚙️ Что такое свойство position: sticky в CSS и зачем оно используется?

position: sticky фиксирует элемент внутри его родителя, когда он достигает определённого положения при прокрутке.

Это удобно для заголовков, меню и панелей, которые должны оставаться на виду при скролле.

➡️ Пример:

<div class="section">
<h2 class="sticky-title">Заголовок</h2>
<p>Контент...</p>
</div>

<style>
.section {
height: 1500px;
padding: 20px;
}

.sticky-title {
position: sticky;
top: 0;
background: white;
padding: 10px;
border-bottom: 1px solid #ccc;
}
</style>


🗣 В этом примере заголовок "прилипает" к верхней части экрана при прокрутке, но только в пределах родительского блока .section.

CodeBase | Frontend | #CSS
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/codebase_frontend/674
Create:
Last Update:

⚙️ Что такое свойство position: sticky в CSS и зачем оно используется?

position: sticky фиксирует элемент внутри его родителя, когда он достигает определённого положения при прокрутке.

Это удобно для заголовков, меню и панелей, которые должны оставаться на виду при скролле.

➡️ Пример:

<div class="section">
<h2 class="sticky-title">Заголовок</h2>
<p>Контент...</p>
</div>

<style>
.section {
height: 1500px;
padding: 20px;
}

.sticky-title {
position: sticky;
top: 0;
background: white;
padding: 10px;
border-bottom: 1px solid #ccc;
}
</style>


🗣 В этом примере заголовок "прилипает" к верхней части экрана при прокрутке, но только в пределах родительского блока .section.

CodeBase | Frontend | #CSS

BY CodeBase | Frontend


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/codebase_frontend/674

View MORE
Open in Telegram


telegram Telegram | DID YOU KNOW?

Date: |

Dump Scam in Leaked Telegram Chat

A leaked Telegram discussion by 50 so-called crypto influencers has exposed the extraordinary steps they take in order to profit on the back off unsuspecting defi investors. According to a leaked screenshot of the chat, an elaborate plan to defraud defi investors using the worthless “$Few” tokens had been hatched. $Few tokens would be airdropped to some of the influencers who in turn promoted these to unsuspecting followers on Twitter.

Telegram has exploded as a hub for cybercriminals looking to buy, sell and share stolen data and hacking tools, new research shows, as the messaging app emerges as an alternative to the dark web.An investigation by cyber intelligence group Cyberint, together with the Financial Times, found a ballooning network of hackers sharing data leaks on the popular messaging platform, sometimes in channels with tens of thousands of subscribers, lured by its ease of use and light-touch moderation.telegram from br


Telegram CodeBase | Frontend
FROM USA