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
Nginx (engine x) is a high-performance HTTP and r...
There are many seemingly true "rumors" ...
The editor also shares with you the corresponding...
The first time I wrote a MySQL FUNCTION, I kept g...
Problem Description 1. Database of the collection...
What is my.ini? my.ini is the configuration file ...
Introduction Closure is a very powerful feature i...
Table of contents Previous words Synchronous and ...
Create Table create table table name create table...
Preface A character set is a set of symbols and e...
Copy code The code is as follows: <!DOCTYPE ht...
Overview The framework diagram of this article is...
MySQL installation instructions MySQL is a relati...
When using element-ui, there is a commonly used c...
Front-end technology layer (The picture is a bit e...