method: Take less in the actual project as an example: .lk-toolbar { .el-input { width: 169px; margin-right: 10px; } > * { margin-bottom: 20px; } } The above code successfully implements the margin-bottom: 20px of all sub-elements under .lk-toolbar This avoids the idiotic task of listing all possible sub-element types: .lk-toolbar { .el-input { width: 169px; margin-right: 10px; margin-bottom: 20px; } .el-button, .el-date-editor { margin-bottom: 20px; } } Application scenarios (effects): Insights (nonsense): At first I wondered if there was such a selector in CSS to select all child elements. Later I looked at the documentation and found that although there was no such selector, the most basic method has been told to you, and the rest depends on your own luck (see if you can use it flexibly!) Tutorial OS: "The methods are all here. It's up to you whether you can use them or not." This concludes this article on how to select all child elements and add styles with CSS. For more information on adding styles to child elements with CSS, please search previous articles on 123WORDPRESS.COM or continue browsing the related articles below. We hope that everyone will support 123WORDPRESS.COM in the future! |
<<: Some common properties of CSS
>>: Implementation code for adding links to FLASH through HTML (div layer)
a href="#"> After clicking the link, ...
When I was writing a program a few days ago, I wan...
react-native installation process 1.npx react-nat...
Let's take a look at the problem of VScode re...
I will use three days to complete the static page...
This article example shares the specific code for...
What is React React is a simple javascript UI lib...
Copy code The code is as follows: <span style=...
Table of contents Preface Introduction to QueryCa...
1. Using Selenium in Linux 1. Install Chrome Inst...
1. Use Centos image to build local yum source Sin...
Preface This article is quite detailed and even a...
background A colleague is working on his security...
In the WeChat applet project, the development mod...
This article shares the specific code of jQuery t...