Home >Web Front-end >HTML Tutorial >.clock div{position: absolute;border-style:solid;} What does this mean? Can anyone tell me? I don't know what's going on_html/css_WEB-ITnose
I found an example of using CSS to create LED digital effects on the Internet. There are two lines of CSS in it:
.clock{font-size:12px;width:9em;height:14em;border:1px solid #ddd; position:relative;}
.clock div{position: absolute;border-style:solid;}
My question is in the second line, what is the purpose of the div in .clock div Is it an identifier, a div used to control .clock, or other uses? Please give me some advice!
You are also good at CSS. . . . . . .
This is the most basic CSS selector.
.clock div
The previous one selects all tags with class="clock". It does not consider which tag it is, as long as the tag contains class="clock".
The latter one is to find all the child elements whose tags are div based on the previously selected tags.
I rarely write BS projects, I do it in CS More,
According to what you mean.clock div{position: absolute;border-style:solid;}, is the tag applied to all divs in class=clock, right? I just checked some information, and what you said It's a bit close, but yours is more popular. . .
Got it, set multiple styles,