Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Scrolling#336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
barangokcekli wants to merge2 commits intojavascript-tutorial:masterfrombarangokcekli:master
Closed
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,20 +6,20 @@

<body>

<h1>Scroll me</h1>
<h1>Kaydır beni</h1>

<script>
functionpopulate() {
functiondoldur() {
while(true) {
let windowRelativeBottom = document.documentElement.getBoundingClientRect().bottom;
if (windowRelativeBottom > document.documentElement.clientHeight + 100) break;
document.body.insertAdjacentHTML("beforeend", `<p>Date: ${new Date()}</p>`);
document.body.insertAdjacentHTML("beforeend", `<p>Tarih: ${new Date()}</p>`);
}
}

window.addEventListener('scroll',populate);
window.addEventListener('scroll',doldur);

populate(); //init document
doldur(); //dosyayı başlat
</script>

</body>
Expand Down
16 changes: 8 additions & 8 deletions2-ui/3-event-details/8-onscroll/1-endless-page/task.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,19 +2,19 @@ importance: 5

---

#Endless page
#Sonsuz sayfa

Create an endless page. When a visitor scrolls it to the end, it auto-appends current date-time to the text (so that a visitor can scroll more).
Sonsuz bir sayfa oluşturun. Ziyaretçi sayfayı sonuna kadar kaydırığında metnin sonuna otomatik olarak güncel tarih-saat eklenir (böylece ziyaretçi daha fazla kaydırabilir).

Like this:
Örnekteki gibi:

[iframe src="solution" height=200]

Please note two important features of the scroll:
Lütfen kaydırmanın iki önemli özelliğine dikkat edin:

1. **The scroll is "elastic".**We can scroll a little beyond the document start or end in some browsers/devices (empty space below is shown, and then the document will automatically "bounces back" to normal).
2. **The scroll is imprecise.**When we scroll to page end, then we may be in fact like 0-50px away from the real document bottom.
1. **Kaydırma "esnektir".**Bazı tarayıcılarda / cihazlarda belge başlangıcından veya sonundan biraz öteye kaydırabiliriz (altında boşluk görüntülenir ardından belge otomatik olarak normale "geri döner").
2. **Kaydırma "belirsizdir".** Sayfa sonuna kaydırdığımızda gerçek belgenin altından 0-50 piksel kadar uzakta olabiliriz.

So, "scrolling to the end" should mean that the visitor is no more than 100px away from the document end.
Dolayısıyla, "sonuna kadar kaydırma" ziyaretçinin belgenin sonundan 100 pikselden daha fazla uzaktlıkta olmadığı anlamına gelmelidir.

P.S. In real life we may want to show "more messages" or "more goods".
Not: Gerçek hayatta "daha fazla mesaj" veya "daha fazla ürün" göstermek isteyebiliriz.

[8]ページ先頭

©2009-2025 Movatter.jp