border specification for <span>

Asked 1 years ago, Updated 1 years ago, 36 views

Hello, I am studying HTML, CSS, and jQuery.
I am writing to ask you a question because there were some things that I didn't understand when I was browsing the jQuery study site for beginners.
Image 1

The question is about the source code of this image.
It says that if you run it, the part surrounded by the span tag becomes red, but with this source code, doesn't the line surrounding the span tag become #c00 color?
If the text changes to red, I think the contents of the CSS selector should be ('color', 'red'); but I really don't understand it, so please reply if you don't mind.

jquery

2022-09-29 20:28

1 Answers

Is the article How to use $(this) in jQuery (where does it point?)?

It is true that the article contains

  • "Only the <p> element you clicked will be in the red"
  • "Round the parent element of the <p> you clicked"

As you pointed out, the code is "&span> ruled line for the child element of <p>" and the comment seems to be incorrect.
I think the basic understanding is correct, so it is reasonable to throw those things into the comments section of the original article.

First of all, in terms of the questionnaire,

The contents of the CSS selector are

Not the CSS selector.The css method, so to speak.


2022-09-29 20:28

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.