In css, if a person has already stated a class then why does he need to use element after that like what will be the benefits of doing that. For example: There is a class of "content" in element So what will be the difference in css between: .content h1 {...} And .content {....}
.content h1
代表任何h1
标签到所有具有 class 作为content
的元素内的任何级别的子组件,而.content
指的是具有 class 作为content
的元素。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.