In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "the example usage of Modules in CSS". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "the example usage of Modules in CSS".
1. Define the css file.
.className {color: green;} / * write global style * /: global (.className) {color: red;} / * style reuse * / .otherClassName {composes: className; color: yellow;} .otherClassName {composes: className from ". / style.css";}
2. Import the css file in the js module.
Import styles from ". / style.css"; Element [XSS _ clean] =''
3. Configure css-loader packaging. CSS Modules cannot be used directly, but needs to be packaged.
Generally, the configuration of css modules can be completed by configuring the modules property in css-loader.
/ / webpack.config.jsmodule.exports = {module: {rules: [{test: /\ .css $/, use: {loader: 'css-loader', options: {modules: {/ / Custom hash name localIdentName:' [path] [name] _ [local]-- [hash:base64:5]' }]}}
4. The final packaged css class name is generated by a long list of hash values.
. _ 2DHwuiHWMnKTOYG45T0x34 {color: red;}. _ 10B-buq6_BEOTOl9urIjf8 {background-color: blue;} at this point, I believe you have a better understanding of "the example usage of Modules in CSS". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.