BEM from QQtabBar First of all, what does BEM mean? weui-primary_loading__dot: library name-component_state__element name Library name: is generally agreed upon by each company.
A detailed introduction to BEMB(Block)
E (element): element
M (modifier): modifier
After understanding BEM, we need to think about how we should use it.
Overall, it is a large block containing 4 small blocks, and each small block contains three elements. Block appBar <div class="qqui-appBar"> <a href="#" class="qqui-appBar__item qqui-appBar__item_on"> <span> <i class="iconfont icon-icon-test1 icon_on"></i> <span class="qqui__pointer qqui__pointer_on">1</span> </span> <p class="qqui__desc qqui__desc_on">Message</p> </a> <a href="#" class="qqui-appBar__item"> <span> <i class="iconfont icon-icon-test2"></i> <span class="qqui__pointer"></span> </span> <p class="qqui__desc">Contact</p> </a> <a href="#" class="qqui-appBar__item"> <span> <i class="iconfont icon-icon-test"></i> <span class="qqui__pointer"></span> </span> <p class="qqui__desc">Highlights</p> </a> <a href="#" class="qqui-appBar__item"> <span> <i class="iconfont icon-icon-test3"></i> <span class="qqui__pointer qqui__pointer_oOn"></span> </span> <p class="qqui__desc">Dynamic</p> </a> </div> * { padding: 0; margin: 0; } a:link { color: #b0b3bf; } a:vistied { color: #b0b3bf; } a:hover { color: #2ec4fc; } a:active { color: #2ec4fc; } a i.iconfont { display: inline-block; width: 36px; height: 36px; overflow: hidden; margin-bottom: 3.5px; font-size: 36px; } a i.icon_on{ color: #2ec4fc; } .qqui-appBar { display: flex; position: absolute; bottom: 0; width: 100%; z-index: 500; background-color: #f9f9f9; } .qqui-appBar .qqui-appBar__item { flex: 1; text-align: center; padding-top: 25px; font-size: 0; color: #b0b3bf; text-decoration: none; } .qqui-appBar__item>span{ display: inline-block; position: relative; margin-bottom: 9px; } .qqui-appBar .qqui__desc { font-size: 18px; text-align: center; line-height: 18px; margin-bottom: 13px; } .qqui-appBar .qqui__desc_on{ color: black; } .qqui-appBar .qqui__pointer{ position: absolute; top: -2px; right: -2px; width: 20px; height:20px; display: inline-block; line-height: 18px; color: white; border-radius: 50%; font-size: 10px; } .qqui-appBar .qqui__pointer_on{ background-color: #F43539; } .qqui-appBar .qqui__pointer_oOn{ width: 12px; height: 12px; line-height: 12px; background-color: #F43539; } The final effect The icons above are all from Alibaba Icon Library: https://www.iconfont.cn/collections/detail?spm=a313x.7781069.1998910419.d9df05512&cid=16472 This is the end of this article about the detailed introduction of CSS naming specification BEM from QQtabBar. For more relevant CSS naming specification BEM content, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future! |
<<: Sample code for html list box, text field, and file field
>>: Sample code for displaying a scroll bar after the HTML page is zoomed out
This article example shares the specific code of ...
There are three ways to start a springboot projec...
In actual development, the primary key of MySQL c...
Table of contents 1. Node builds HTTP server 2. H...
Global Object All modules can be called global: r...
1. What is it? MySQL is the most popular relation...
This is an enhanced version. The questions and SQ...
I recently bought the cheapest Tencent cloud serv...
Based on theories such as Saussure's philosop...
The specific code of the sliding button made with...
MySQL supports three types of comments: 1. From t...
Experimental environment: 1. Three CentOS 7 serve...
1. Usage of instanceof instanceof operator is use...
Table of contents Changes in the life cycle react...
Table of contents 1. fill() syntax 2. Use of fill...