div.model__mask
see that others use double sliding lines to divide class names, does this mean anything in the world? (for example, const uses uppercase to make it easier to distinguish types.) Why not use a single slide line, or a crossbar?
div.model__mask
see that others use double sliding lines to divide class names, does this mean anything in the world? (for example, const uses uppercase to make it easier to distinguish types.) Why not use a single slide line, or a crossbar?
this is the BEM nomenclature
uses the BEM naming convention, which theoretically has only one selector per line of css code.
BEM stands for "block (block), element (element), modifier (modifier)", and we often use these three entities to develop components.
in the selector, the extended relationship is represented by the following three symbols:
Dash in _ _ double underscore: the double underscore is used to connect the block and the child elements of the block
_ single underscore: the single underscore is used to describe the state of a block or the child elements of a block
I hope my answer can help you. Thank you
jianghu generally uses-to connect. _ _ this depends on what meaning you define for him.
is usually written in the following ways:
1: hump
2: connect with horizontal bars (single / pair)
3: connect with underscore (single / pair)
as far as I'm concerned, it's just a matter of code style. It depends on how your company regulates it, and it uses whatever it says.
carrots and vegetables have their own preferences.
you can take a look at the article here: https://css-tricks.com/bem-101/
.doesn't make any sense, just keep agreeing and don't mix it up, such as
//
model__mask
model_mask
model-mask
modelMask
Previous: How does MongoDB do migration? like MySQL does?
Next: MongoDB does a comment system, how to design the structure of the data table?
I set the parent element to relative and the child element position to absolute positioning, but why does the font position change relative to the background when I zoom in and out? In the screenshot below, you can see the zoom in and out of the page, a...
at first I didn t write the CSS and HTML of the main area the following code is the sidebar CSS, page effect as shown in figure 2 main ...
there is usually a fixed process when developing a SPA like Vue, such as scaffolding to generate npm dependencies, then install dependencies, personalize Webpack configuration, jslint configuration, and then start writing components and so on. what ar...
recently, the company is going to write WeChat Mini Programs, which is all written in the grammar of the original sound Mini Program. I recently heard that mpvue, is very popular, and decided to learn. I can want to write the original WeChat Mini Program...
There are multiple CheckBox, on the page. Select one to load a component and uncheck to delete a component. ? Select one to load one video, uncheck and delete one, and select a maximum of 9. The data given by the background CheckBox is uncertain. It ...
...
at first I thought of indexOf (), but the usage on the Internet is an one-dimensional array. What if the array contains multiple objects? array:[ { id:1, name: A }, { id:2, name: B }, { ...
first question: 1080x2160316x512, I would like to ask how to set up this. I seldom do the mobile end at ordinary times, so it is stupid . second question: ...
< hr > The tabBar in antd mobile is created according to the following number of menu. The same div, is created by switching display modules between hiding and reality. that is, each switching menu is the display and hiding of div (the display and hidi...
want to achieve an effect that both An and B have: A: when the page scrolls up and down, scroll to the specified module, which will remain at the top of the visual area of the page without scrolling with the scroll bar. B: in the case of the An effec...
how to calculate the speed when the mobile phone is inertial scrolling, and how to decrease the speed after that because I want to be a scrolling plug-in on the mobile phone, I want to simulate the original inertia scrolling of the phone, that is, aft...
for example: when I click the button for all the tags, I will display the contents corresponding to all the tags ...