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
Based on Vue The core idea of this function is ...
When inserting a set of data into the MySQL datab...
Shell is a program written in C language, which i...
<br />Semanticization cannot be explained in...
Recently, I want to build a hadoop test cluster i...
When the jsp that is jumped to after the struts2 a...
Table of contents 1. Decoupled assignment of arra...
Table of contents Overview Virtual Dom principle ...
MouseEvent When the mouse performs a certain oper...
Table of contents Preface The role of deconstruct...
In the previous article, we introduced three comm...
Standardized design solutions - markup languages ...
1. Analytical thinking 1. Eliminate the machine...
When developing and debugging a web application, ...
Technical Background Latex is an indispensable to...