OOCSS(面向對象的CSS)總結

来源:https://www.cnblogs.com/lprosper/archive/2019/02/22/10419296.html
-Advertisement-
Play Games

按鈕樣式庫:buttons.css ...


按鈕樣式庫:buttons.css

  1 /* vue */
  2 [v-cloak]{display: none}
  3 
  4 /* 滾動條 */
  5 ::-webkit-scrollbar {
  6     width: 6px;
  7     height: 6px;
  8     background-color: transparent;
  9 }
 10 ::-webkit-scrollbar-thumb {
 11     background: linear-gradient(-90deg, rgba(215, 215, 215, 0.95), rgba(225, 228, 228, 0.95));
 12     border-radius: 2px;
 13 }
 14 ::-webkit-scrollbar-track {
 15     background-color: transparent;
 16 }
 17 
 18 /* 全局 */
 19 /**
 20  * -webkit-overflow-scrolling: touch; //有回彈效果 
 21  * -webkit-overflow-scrolling: auto; //滑到哪停到哪 
 22  **/
 23 *{padding: 0;margin: 0;font-style: normal;outline: none;box-sizing: border-box;-webkit-overflow-scrolling: touch;-webkit-tap-highlight-color:transparent;}
 24 ul,ol{list-style: none;}
 25 a{text-decoration: none;}
 26 table{border-collapse: collapse;}
 27 html,body{position: relative;}
 28 
 29 /* 定位 */
 30 .por{position: relative;}
 31 .poa{position: absolute;}
 32 .pof{position: fixed;}
 33 .left{left: 0;}
 34 .top{top: 0;}
 35 .right{right: 0;}
 36 .bottom{bottom: 0;}
 37 .left_50{left: 50%;}
 38 .top_50{top: 50%;}
 39 .right_50{right: 50%;}
 40 .bottom_50{bottom: 50%;}
 41 .transform_center{transform: translate(-50%,-50%);}
 42 .transform_X{transform: translateX(-50%);}
 43 .transform_Y{transform: translateY(-50%);}
 44 .z-1{z-index: -1;}
 45 .z0{z-index: 0;}
 46 .z1{z-index: 1;}
 47 .z2{z-index: 2;}
 48 .z3{z-index: 3;}
 49 .z4{z-index: 4;}
 50 .z5{z-index: 5;}
 51 .z6{z-index: 6;}
 52 .z9999{z-index: 9999;}
 53 .z99999{z-index: 99999;}
 54 
 55 /* 浮動 */
 56 .L{float: left;}
 57 .R{float: right;}
 58 .clear::before,
 59 .clear::after{content: '';clear: both;display: block;}
 60 
 61 /* 塊級、文本元素 */
 62 .inblock{display: inline-block;}
 63 .grid{display: grid;}
 64 .block{display: block;}
 65 .inline{display: inline;}
 66 .webkitbox{display: -webkit-box;}
 67 
 68 
 69 /* 圖片填充 */
 70 .of_cover{object-fit: cover;}
 71 .of_contain{object-fit: contain;}
 72 
 73 
 74 /* 背景圖片填充 */
 75 .bgs_cover{background-size: cover;}
 76 .bgp_center{background-position: center;}
 77 
 78 /* 文本 */
 79 .txt_normal{font-weight: 400;font-style: normal;}
 80 .pointer{cursor: pointer;}
 81 .txt_left{text-align: left;}
 82 .txt_center{text-align: center;}
 83 .txt_nowrap{white-space: nowrap;}
 84 .txt_ellipsis{text-overflow: ellipsis;}
 85 .txt_justify{text-align: justify;}
 86 .b{font-weight: bolder;}
 87 .middle{vertical-align: middle;}
 88 
 89 
 90 /* 溢出 */
 91 .overhidden{overflow: hidden;}
 92 .overauto{overflow: auto;}
 93 .overhidden-x{overflow-x: hidden;overflow-y: auto;}
 94 .overhidden-y{overflow-y: hidden;overflow-x: auto;}
 95 
 96 /* flex彈性佈局 */
 97 .flex{display: flex;}
 98 .jc_start{justify-content: flex-start;}
 99 .jc_center{justify-content: center;}
100 .jc_between{justify-content: space-between;}
101 .ai_center{align-items: center;}
102 .ai_end{align-items: flex-end;}
103 .flex1{flex: 1;}
104 
105 
106 /* border */
107 .border{border: 0;}
108 .border_l{border-left: 0;}
109 .border_t{border-top: 0;}
110 .border_r{border-right: 0;}
111 .border_b{border-bottom: 0;}
112 
113 /* border-radius */
114 .radius1{border-radius: 1px;}
115 .radius2{border-radius: 2px;}
116 .radius3{border-radius: 3px;}
117 .radius4{border-radius: 4px;}
118 .radius5{border-radius: 5px;}
119 .radius6{border-radius: 6px;}
120 .radius7{border-radius: 7px;}
121 .radius8{border-radius: 8px;}
122 .radius9{border-radius: 9px;}
123 .radius10{border-radius: 10px;}
124 .radius_tl{border-top-left-radius: 0;}
125 .radius_tr{border-top-right-radius: 0;}
126 .radius_br{border-bottom-right-radius: 0;}
127 .radius_bl{border-bottom-left-radius: 0;}
128 
129 
130 /* font-size */
131 .f8{font-size: 8px;}
132 .f9{font-size: 9px;}
133 .f10{font-size: 10px;}
134 .f11{font-size: 11px;}
135 .f12{font-size: 12px;}
136 .f13{font-size: 13px;}
137 .f14{font-size: 14px;}
138 .f15{font-size: 15px;}
139 .f16{font-size: 16px;}
140 .f17{font-size: 17px;}
141 .f18{font-size: 18px;}
142 .f19{font-size: 19px;}
143 .f20{font-size: 20px;}
144 
145 
146 /* 寬度 */
147 .w_10{width: 10%;}
148 .w_20{width: 20%;}
149 .w_30{width: 30%;}
150 .w_333{width: 33.3%;}
151 .w_40{width: 40%;}
152 .w_50{width: 50%;}
153 .w_60{width: 60%;}
154 .w_70{width: 70%;}
155 .w_80{width: 80%;}
156 .w_90{width: 90%;}
157 .w_100{width: 100%;}
158 .w100{width: 100px;}
159 
160 /* 高度 */
161 .h_10{height: 10%;}
162 .h_20{height: 20%;}
163 .h_30{height: 30%;}
164 .h_333{height: 33.3%;}
165 .h_40{height: 40%;}
166 .h_50{height: 50%;}
167 .h_60{height: 60%;}
168 .h_70{height: 70%;}
169 .h_80{height: 80%;}
170 .h_90{height: 90%;}
171 .h_100{height: 100%;}
172 .h100{height: 100px;}
173 .lh100{line-height: 100px;}
174 
175 
176 /* color */
177 .color333{color: #333;}
178 .color666{color: #666;}
179 .color999{color: #999;}
180 .colorccc{color: #ccc;}
181 .coloreee{color: #eee;}
182 .colorfff{color: #fff;}
183 
184 /* background-color */
185 .bgcolor333{background-color: #333;}
186 .bgcolor666{background-color: #666;}
187 .bgcolor999{background-color: #999;}
188 .bgcolorccc{background-color: #ccc;}
189 .bgcoloreee{background-color: #eee;}
190 .bgcolorfff{background-color: #fff;}
191 
192 
193 /* opacity */
194 .opa0{opacity: 0;}
195 .opa1{opacity: 0.1;}
196 .opa2{opacity: 0.2;}
197 .opa3{opacity: 0.3;}
198 .opa4{opacity: 0.4;}
199 .opa5{opacity: 0.5;}
200 .opa6{opacity: 0.6;}
201 .opa7{opacity: 0.7;}
202 .opa8{opacity: 0.8;}
203 .opa9{opacity: 0.9;}
204 
205 /* padding */
206 .pad10{padding: 10px;}
207 .pad15{padding: 15px;}
208 .pad20{padding: 20px;}
209 .pad24{padding: 24px;}
210 .pad30{padding: 30px;}
211 .pad{padding: 0;}
212 .pad_l{padding-left: 0;}
213 .pad_t{padding-top: 0;}
214 .pad_r{padding-right: 0;}
215 .pad_b{padding-bottom: 0;}
216 
217 /* margin */
218 .mar_auto{margin: 0 auto;}
219 .mar10{margin: 10px;}
220 .mar15{margin: 15px;}
221 .mar20{margin: 20px;}
222 .mar24{margin: 24px;}
223 .mar30{margin: 30px;}
224 .mar{margin: 0;}
225 .mar_l{margin-left: 0;}
226 .mar_t{margin-top: 0;}
227 .mar_r{margin-right: 0;}
228 .mar_b{margin-bottom: 0;}
229 
230 /* 解決ios-button圓角問題 */
231 .ios_btn{-webkit-appearance : none ;}

 


您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 在本節中,註意到三維底圖既加入了行政邊界的矢量要素圖層,也加入了場景要素 var countries = new FeatureLayer({ //各國矢量邊界 url:"https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/service ...
  • Web前端JQuery面試題(三) 1.怎麼阻止冒泡過程? 2. 方法和 方法的區別? 方法要等頁面中全部元素載入到瀏覽器中才執行,如果頁面中存在大量圖片,要等這些內容載入完畢。 方法只要頁面的 模型載入完畢即可,就會觸發 。 3.請寫出 相同方法? 4. 方法綁定事件有瞭解嗎? 5.寫出一個映射方 ...
  • 基於 jquery 的插件 turn.js 學習筆記 簡介 turn.js是一個可以實現3d書籍展示效果的jq插件,使用html5和css3來執行效果。可以很好的適應於ios和安卓等觸摸設備。 ___ How it works? 下麵是官網展示的最簡單的一個應用實例 1.編寫html部分 2.編寫j ...
  • 大家最常用作圖標的元素是i標簽,為什麼呢? 綜合來看,從實用性上暫時沒看出有什麼缺陷,所以目前用不用 <i> 取決於你對於遵循規範有多潔癖。 具體如何在元素內容前後添加圖標呢?這就要用使用偽元素:before和after,語法: 1. 直接插入圖片 2. 使用特殊字元 2.1 語法 2.2 HTML ...
  • 第一次寫博客,本來是學習jQuery遇到閉包問題,發現並沒有理解閉包,發現閉包牽扯的知識點太多。複習了一遍(發現自己該記住的全忘了)寫在博客里,自己也是小白,希望大神們指點迷津,必將感激不盡。 我們知道JavaScript有兩個特點:單線程,解釋型語(翻譯一行,解釋一行)。但其實翻譯一行,解釋一行是 ...
  • 為縮減篇幅,已略去ubuntu鏡像下載、虛擬機(VirtualBox、VMware)安裝等操作,若有疑問請搜索相關教程。 1、虛擬機系統安裝 本教程使用Ubuntu16.04 server版本(desktop版也是可以的)。若使用Vm虛擬機,新建時先不要選擇鏡像,因為簡易安裝存在問題: 創建完畢後, ...
  • 前端表單中有身份證號的校驗,下邊是用JS來校驗身份證號的合法性。 中國居民身份證號碼編碼規則 第一、二位表示省(自治區、直轄市、特別行政區)。 第三、四位表示市(地級市、自治州、盟及國家直轄市所屬市轄區和縣的彙總碼)。其中,01-20,51-70表示省直轄市;21-50表示地區(自治州、盟)。 第五 ...
  • Doctype作用?嚴格模式與混合模式,如何觸發者這兩種模式,區分它們有何意義? 1.1 Doctype作用 <!DOCTYPE>聲明叫做文件類型定義(DTD),聲明的作用為了告訴瀏覽器該文件的類型。讓瀏覽器解析器知道應該用哪個規範來解析文檔。<!DOCTYPE>聲明必須在 HTML 文檔的第一行, ...
一周排行
    -Advertisement-
    Play Games
  • 前言 本文介紹一款使用 C# 與 WPF 開發的音頻播放器,其界面簡潔大方,操作體驗流暢。該播放器支持多種音頻格式(如 MP4、WMA、OGG、FLAC 等),並具備標記、實時歌詞顯示等功能。 另外,還支持換膚及多語言(中英文)切換。核心音頻處理採用 FFmpeg 組件,獲得了廣泛認可,目前 Git ...
  • OAuth2.0授權驗證-gitee授權碼模式 本文主要介紹如何筆者自己是如何使用gitee提供的OAuth2.0協議完成授權驗證並登錄到自己的系統,完整模式如圖 1、創建應用 打開gitee個人中心->第三方應用->創建應用 創建應用後在我的應用界面,查看已創建應用的Client ID和Clien ...
  • 解決了這個問題:《winForm下,fastReport.net 從.net framework 升級到.net5遇到的錯誤“Operation is not supported on this platform.”》 本文內容轉載自:https://www.fcnsoft.com/Home/Sho ...
  • 國內文章 WPF 從裸 Win 32 的 WM_Pointer 消息獲取觸摸點繪製筆跡 https://www.cnblogs.com/lindexi/p/18390983 本文將告訴大家如何在 WPF 裡面,接收裸 Win 32 的 WM_Pointer 消息,從消息裡面獲取觸摸點信息,使用觸摸點 ...
  • 前言 給大家推薦一個專為新零售快消行業打造了一套高效的進銷存管理系統。 系統不僅具備強大的庫存管理功能,還集成了高性能的輕量級 POS 解決方案,確保頁面載入速度極快,提供良好的用戶體驗。 項目介紹 Dorisoy.POS 是一款基於 .NET 7 和 Angular 4 開發的新零售快消進銷存管理 ...
  • ABP CLI常用的代碼分享 一、確保環境配置正確 安裝.NET CLI: ABP CLI是基於.NET Core或.NET 5/6/7等更高版本構建的,因此首先需要在你的開發環境中安裝.NET CLI。這可以通過訪問Microsoft官網下載並安裝相應版本的.NET SDK來實現。 安裝ABP ...
  • 問題 問題是這樣的:第三方的webapi,需要先調用登陸介面獲取Cookie,訪問其它介面時攜帶Cookie信息。 但使用HttpClient類調用登陸介面,返回的Headers中沒有找到Cookie信息。 分析 首先,使用Postman測試該登陸介面,正常返回Cookie信息,說明是HttpCli ...
  • 國內文章 關於.NET在中國為什麼工資低的分析 https://www.cnblogs.com/thinkingmore/p/18406244 .NET在中國開發者的薪資偏低,主要因市場需求、技術棧選擇和企業文化等因素所致。歷史上,.NET曾因微軟的閉源策略發展受限,儘管後來推出了跨平臺的.NET ...
  • 在WPF開發應用中,動畫不僅可以引起用戶的註意與興趣,而且還使軟體更加便於使用。前面幾篇文章講解了畫筆(Brush),形狀(Shape),幾何圖形(Geometry),變換(Transform)等相關內容,今天繼續講解動畫相關內容和知識點,僅供學習分享使用,如有不足之處,還請指正。 ...
  • 什麼是委托? 委托可以說是把一個方法代入另一個方法執行,相當於指向函數的指針;事件就相當於保存委托的數組; 1.實例化委托的方式: 方式1:通過new創建實例: public delegate void ShowDelegate(); 或者 public delegate string ShowDe ...