- Notifications
You must be signed in to change notification settings - Fork230
Element size and scrolling#433
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
Merged
joaquinelio merged 49 commits intojavascript-tutorial:masterfromlgabrielvleon:lgabrielvleon-patch-1Dec 17, 2020
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
49 commits Select commitHold shift + click to select a range
18a2e99
Update solution.md
lgabrielvleonba5c94e
Update task.md
lgabrielvleon5226df4
Update solution.md
lgabrielvleon9c9b64f
Update task.md
lgabrielvleonca42219
Update solution.md
lgabrielvleon466734d
Update task.md
lgabrielvleon9740728
Update solution.md
lgabrielvleon2e0bd7c
Update task.md
lgabrielvleon086ae04
Update index.html
lgabrielvleondb46b72
Update article.md
lgabrielvleon6439b88
Update article.md
lgabrielvleon2b32f2b
Update article.md
lgabrielvleoncf550f5
Update article.md
lgabrielvleon3763bb4
Update article.md
lgabrielvleonb5522eb
alineando
joaquinelio3a695f6
Update 2-ui/1-document/09-size-and-scroll/6-width-vs-clientwidth/task.md
lgabrielvleonad78fbb
Update 2-ui/1-document/09-size-and-scroll/1-get-scroll-height-bottom/…
lgabrielvleon9821cfd
Update 2-ui/1-document/09-size-and-scroll/article.md
lgabrielvleonea2eabf
Update 2-ui/1-document/09-size-and-scroll/article.md
lgabrielvleon1c91fcb
Update 2-ui/1-document/09-size-and-scroll/article.md
lgabrielvleon64e7ef4
Update 2-ui/1-document/09-size-and-scroll/article.md
lgabrielvleon5889c25
Update 2-ui/1-document/09-size-and-scroll/2-scrollbar-width/task.md
lgabrielvleon28eb465
Update 2-ui/1-document/09-size-and-scroll/2-scrollbar-width/task.md
lgabrielvleon989c60b
Update 2-ui/1-document/09-size-and-scroll/4-put-ball-in-center/soluti…
lgabrielvleon1e1a2bd
Update 2-ui/1-document/09-size-and-scroll/4-put-ball-in-center/soluti…
lgabrielvleonbb6abd8
Update 2-ui/1-document/09-size-and-scroll/4-put-ball-in-center/soluti…
lgabrielvleon4d76cf2
Update 2-ui/1-document/09-size-and-scroll/article.md
lgabrielvleondd0e94f
Update 2-ui/1-document/09-size-and-scroll/2-scrollbar-width/task.md
lgabrielvleon3d6a862
Update 2-ui/1-document/09-size-and-scroll/4-put-ball-in-center/task.md
lgabrielvleon669d366
Update 2-ui/1-document/09-size-and-scroll/6-width-vs-clientwidth/solu…
lgabrielvleonb63c3a4
Update 2-ui/1-document/09-size-and-scroll/4-put-ball-in-center/task.md
lgabrielvleon0f2480e
Update 2-ui/1-document/09-size-and-scroll/6-width-vs-clientwidth/solu…
lgabrielvleon980057b
Update solution.md
lgabrielvleonf7ff985
Update 2-ui/1-document/09-size-and-scroll/2-scrollbar-width/solution.md
vplentinaxddb54ac
Update 2-ui/1-document/09-size-and-scroll/2-scrollbar-width/task.md
vplentinax00ed4fc
Update 2-ui/1-document/09-size-and-scroll/4-put-ball-in-center/task.md
vplentinax9d315d0
Update 2-ui/1-document/09-size-and-scroll/4-put-ball-in-center/task.md
vplentinax8012f83
Update 2-ui/1-document/09-size-and-scroll/6-width-vs-clientwidth/solu…
vplentinax62bca3f
Update 2-ui/1-document/09-size-and-scroll/6-width-vs-clientwidth/task.md
vplentinaxcd7e165
Update 2-ui/1-document/09-size-and-scroll/article.md
vplentinax9970a93
Update 2-ui/1-document/09-size-and-scroll/article.md
vplentinax1344926
Update 2-ui/1-document/09-size-and-scroll/article.md
vplentinax29120e2
Update 2-ui/1-document/09-size-and-scroll/article.md
vplentinax25f7874
Update 2-ui/1-document/09-size-and-scroll/article.md
vplentinax601704f
Update 2-ui/1-document/09-size-and-scroll/article.md
vplentinax4e51234
Update 2-ui/1-document/09-size-and-scroll/article.md
vplentinax41d06ed
Update 2-ui/1-document/09-size-and-scroll/article.md
vplentinaxd5be71f
Update 2-ui/1-document/09-size-and-scroll/article.md
vplentinax08f1899
Update 2-ui/1-document/09-size-and-scroll/article.md
vplentinaxFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
4 changes: 2 additions & 2 deletions2-ui/1-document/09-size-and-scroll/1-get-scroll-height-bottom/solution.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
La solución es: | ||
```js | ||
let scrollBottom = elem.scrollHeight - elem.scrollTop - elem.clientHeight; | ||
``` | ||
En otras palabras: (altura total) menos (parte superior desplazada) menos (parte visible) --esa es exactamente la parte inferior desplazada. |
8 changes: 4 additions & 4 deletions2-ui/1-document/09-size-and-scroll/1-get-scroll-height-bottom/task.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions2-ui/1-document/09-size-and-scroll/2-scrollbar-width/solution.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions2-ui/1-document/09-size-and-scroll/2-scrollbar-width/task.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
28 changes: 14 additions & 14 deletions2-ui/1-document/09-size-and-scroll/4-put-ball-in-center/solution.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions2-ui/1-document/09-size-and-scroll/4-put-ball-in-center/task.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions2-ui/1-document/09-size-and-scroll/6-width-vs-clientwidth/solution.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Diferencias: | ||
1. `clientWidth`es numérico, mientras `getComputedStyle(elem).width`retorna una cadena con `px`en el final. | ||
2. `getComputedStyle`puede devolver un ancho no numérico como`"auto"`para un elemento en linea. | ||
lgabrielvleon marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
3. `clientWidth`es el contenido interior del área del elemento más los rellenos, mientras el ancho de CSS (con el estándar`box-sizing`)es el contenido interior del área *sin rellenos*. | ||
4.Si hay una barra de desplazamiento y el navegador reserva espacio para esta, algunos navegadores restan ese espacio del ancho de CSS (por que no está disponible para el contenido),y otros no. La propiedad`clientWidth`es siempre la misma: el tamaño de la barra de desplazamiento se resta si está reservado. |
6 changes: 3 additions & 3 deletions2-ui/1-document/09-size-and-scroll/6-width-vs-clientwidth/task.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.