$('div:nth-child(2)').css ('background', 'red')
applied.
div
I tried to apply it to my second child,
I don't know why it applies to all children except section data-role=header
$('div:nth-child(1)').When running css('background', 'red')
The first child of div
It applies well to id=dee2
.
When CSS instructs div:nth-child(2)
, what does the browser do to select?
In the given code, $('div:nth-child(2))
is kept by #dee1
and #dee3
. Why? Because #dee1
is the second element under the parent section[data-role=page]
and #dee3
is the second element under the parent #div1
. Give a little transparency to the background and you'll understand the situation better.
Find out more.
887 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
567 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
610 Uncaught (inpromise) Error on Electron: An object could not be cloned
568 Who developed the "avformat-59.dll" that comes with FFmpeg?
© 2024 OneMinuteCode. All rights reserved.