CSS簡寫指南

1.margin

1.1 margin:1px 2px 3px(上 左右 下)

1.2 margin:2px 3px(上下 左右)

1.2 margin:1px 3px 2px 3px(上右下左)

2.padding(同上)

3.border

border:1px red solid

(border-width border-color border-style)

1
2
3
border-width:1px 2px 3px; //最多可用四個值,縮寫規則類似盒子大小的縮寫,下同
border-style:solid dashed dotted groove;
border-color:red blue white black;

4.background

background:#234 url(./path/img.jpg) no-repeat top left fixed

(background-color background-image background-repeat background-position background-attachment)

1
2
3
4
5
background-color: color || #hex || RGB(% || 0-255) || RGBa;
background-image:url();
background-repeat: repeat || repeat-x || repeat-y || no-repeat;
background-position: X Y || (top||bottom||center) (left||right||center);
background-attachment: scroll || fixed;

5.font

font:italic normal bold 12px/16px serif

(font-style font-variant font-weight font-size / line-height font-family)

1
2
3
4
5
6
font-style: normal || italic || oblique;
font-variant:normal || small-caps;
font-weight: normal || bold || bolder || || lighter || (100-900);
font-size: (number+unit) || (xx-small - xx-large);
line-height: normal || (number+unit);
font-family:name,"more names";

font縮寫

6.list-style

list-style:none;//常用 用于清楚列表樣式

list-style:circle inside url(../img.gif)

(list-style-type list-style-position?list-style-image)

1
2
3
list-style-type:none || disc || circle || square || decimal || lower-alpha || upper-alpha || lower-roman || upper-roman
list-style-position:  inside || outside || inherit
list-style-image:  (url) || none || inherit

?

轉載于:https://www.cnblogs.com/daxian2012/articles/2562848.html

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/377403.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/377403.shtml
英文地址,請注明出處:http://en.pswp.cn/news/377403.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

【C++基礎】模板基礎與函數模板

目錄初識模板函數模板函數模板實例化顯式實例化隱式實例化初識模板 求兩個int、float、char類型的數據的最大值: C里面要這樣寫: int maxInt(int x, int y); double maxDouble(double x, double y); char maxChar(char x, char y);C使用函數重載&#…

scala 函數中嵌套函數_Scala合成函數

scala 函數中嵌套函數Scala中的合成功能 (Composition function in Scala) Scala composition function is a way in which functions are composed in program i.e. mixing of more than one functions to extract some results. In Scala programming language, there are mu…

js--基礎

js 0為false 非0為true null為false 非null為true js 特有with(對象){}:可以確定對象所使用的范圍。for(變量 in 對象)對變量和和行為進行遍歷html xhtml xml :這些都是標記型文檔。DOM:document object model 文檔對象模型。 dom三層模型: dom1:將…

字符串的處理[C#]

//string Str1 "友情相逢"; //string Str2 "用一生愛你"; //#region char的使用 //char a a; //Console.WriteLine("IsLetter方法判斷a是否為字母:{0}", Char.IsLetter(a)); …

CentOS安全設置

CentOS安全設置 刪除多余的用戶和用戶組,修改口令文件屬性,禁止[CtrlAltDelete]重啟命令,防止別人ping的方法。整理自互聯網。1、刪除多余的用戶和用戶組//刪除多余用戶# vi /etc/passwduserdel admuserdel lpuserdel syncuserdel shutdownus…

【設計模式之美】<Reading Notes>繼承與組合

繼承缺點 繼承是面向對象的四大特性之一,用來表示類之間的 is-a 關系,可以解決代碼復用的問題。雖然繼承有諸多作用,但繼承層次過深、過復雜,也會影響到代碼的可維護性。在這種情況下,我們應該盡量少用,甚至…

scala中何時使用下劃線_在Scala中使用下劃線

scala中何時使用下劃線Underscore (_) character is reserved in Scala and has multiple usages in the programming language. Based on functions that use the underscore have the following usages: 下劃線(_)字符在Scala中保留,并且在編程語言中有多種用法。…

如何利用C#編寫網頁投票器程序 如何使用代理來投票 代理IP來投票

一、前言看個圖,了解下投票的過程。提交投票信息投票頁 ――――――――>投票信息處理頁反饋投票結果(請求頁)<―――――――(響應頁)一般情況下,填寫投票信息,然后點提交按鈕發送到響應頁,這…

【設計模式之美】<Reading Notes>貧血模型與充血模型

小知識 需要了解的一些名詞 1、領域驅動設計(Domain Driven Design,簡稱 DDD) 2、MVC 三層架構 : M 表示 Model,V 表示 View,C 表示 Controller。 它將整個項目分為三層:展示層、邏輯層、數據層…

TAFE的完整形式是什么?

TAFE:拖拉機和農用設備 (TAFE: Tractors and Farm Equipment) TAFE is an abbreviation of Tractors and Farm Equipment Limited. It is an Indian tractor manufacturer which is founded at Chennai in 1960. It is the second-largest tractor manufacturer in …

Oracle 10g 數據庫的備份和還原

一、備份數據庫1.在圖形工具中,如sqldeveloper,pl/sqldeveloper用以下這句查找空表select alter table ||table_name|| allocate extent; from user_tables where num_rows0;2.把第一步執行得到的結果當用sql語來再次執行3.到oracle服務器上執行備份語句. 運行-cmd …

用戶行為分析指導電商精細化運營

規模和利潤,這兩個在商業運營中最基本的指標,卻在電子商務市場中遭遇了不同的待遇。前兩年,幾乎所有的電商企業都只追求規模,不追求利潤,導 致自身的運營極其粗放,絕大多數電商公司只有兩招:猛打…

【C++基礎】 類模板

類模板 模板是將類中某些類型變為泛型,從而定義一個模板。 如下: 類模板的語法 直接進行對比: 泛型化之前 泛型化之后類模板的實例化 注意:只要是對類模版進行實例化,編譯器就會生成一個類!&#xff0…

ruby 怎么拋異常_Ruby中的異常處理

ruby 怎么拋異常Ruby異常處理 (Ruby Exception Handling) Exceptions are abnormal conditions arising in the code segment at runtime in the form of objects. There are certain predefined Exception classes whereas we can create our exception known as Custom excep…

cocos2d-x游戲開發系列教程-中國象棋02-main函數和歡迎頁面

之前兩個博客講述了象棋的規格和工程文件之后,我們繼續深入的從代碼開始學習cocos2dx首先從程序入口main函數開始main函數int APIENTRY _tWinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPTSTR lpCmdLine,int nCmdShow) {UNREFERENCED_PARAMETER(h…

[原創]Android中的android:layout_width和android:width的區別

在android系統中&#xff0c;我們可以通過在xml資源文件中定義布局&#xff0c;一般的寫法是&#xff1a; <LinearLayout xmlns:android"http://schemas.android.com/apk/res/android"android:layout_width"match_parent"android:layout_height"ma…

【C++基礎】模板參數與模板繼承

模板參數 默認類型參數 函數參數可以設定一個默認值&#xff0c;我們現在可以對類模板的類型參數設定一個默認類型。 指定泛型Stack的默認類型參數為 int template<typename T int> class Stack{... };當我們這樣定義一個對象時&#xff1a; Stack<> stack;使…

UNIX標準化及實現之POSIX標準可選頭文件

POSIX標準定義的可選頭文件 頭文件說明<aio.h>異步I/O<mqueue.h>消息隊列<pthread.h>線程<sched.h>執行調度<semaphore.h>信號量<spawn.h>實時spawn接口<stropts.h>XSI STREAMS接口<trace.h>事件跟蹤轉載于:https://www.cnblo…

Julia中的denominator()函數

Julia| 分母()函數 (Julia | denominator() function) denominator() function is a library function in Julia programming language, it is used to get the denominator of the rational representation of the given value. denominator()函數是Julia編程語言中的庫函數&a…

【C++基礎】STL迭代器

已知&#xff1a; STL組成部分&#xff1a; 容器、迭代器、算法、函數對象、空間分配器 容器&#xff1a;用于保存一組數據&#xff0c;數據個體被稱為元素 迭代器&#xff1a;用于遍歷容器中的元素&#xff0c;容器都有自己專屬的迭代器&#xff0c;只有容器才知道如何遍歷自己…