css樣式及作用

2021-10-09 10:00:46 字數 1662 閱讀 8065

padding: 0px;/*內邊距*/

margin: 0px;/*外邊距*/

margin: 0 auto;/***居中*/

text-align: center;/*內容居中*/

text-decoration: none;/*超連結下劃線去

list-style: none;/*列表去點*/

display:inline;/*強制轉換成行*/

display: inline-block;/*行內區域塊標籤*/

text-decoration: underline; /*新增下劃線*/

border: gray 1px white;/*新增邊框線*/

border-radius:8px;/*邊框線圓角*/

/*小手*/

coursor:pointer;

/*相對路徑*/

position: relative;

/*隱藏*/

display: none;

/*顯示*/

display: block;

/*絕對路徑*/

position: absolute;

position: fixed; /* 待在原地 */

overflow: auto; /* 需要時啟用卷軸 */

background-color: rgb(0,0,0); /* 後備顏色 */

background-color: rgba(0,0,0,0.4); /*黑色不透明*/

type

="password"

placeholder

="請輸入密碼"

name

="psw"

required

>

placeholder /*輸入寬提示*/

value /*輸入寬預設輸入*/

type

="text"

placeholder

="請輸入您的手機號"

name

="uname"

required

>

type

="checkbox"

checked

="checked"

>

記住我type

="submit"

>

登陸button

>

width

="300px"

height

="300px"

controls

="autoplay"

>

src=

"img/mv.mp4"

type

="audio/mp4"

>

source

>

font-size: 30px;//字型大小

>

>

請選擇option

>

>

2000option

>

>

2001option

>

select

>

年input type="radio" name="mz" /> //核取方塊

/*去點*/

list-style: none;

CSS及常用樣式

選擇器如何使用css樣式 css樣式優先順序 常用css樣式屬性 第一種 該種樣式表只能定義在style標籤或css檔案中,每個style標籤或css檔案可定義多個css樣式表 選擇器第二種 該種樣式表只能定義在style標籤屬性 html文件中每個標籤都有乙個style標籤屬性。style dec...

CSS樣式 display有哪些作用?

其實就是要你說清楚該屬性有哪些值,每個值都有什麼作用,這個題目可以答得很簡單,但要答全也並非是一件容易的事情。頭部元素都是 示例 div css製作 html html view plain copy divclass table h2class table caption 花名冊 h2 divcl...

css之常用樣式及display樣式

常用樣式 一 背景 背景可以為純色,也可以通過以下屬性的修飾變得絢麗多彩 1.設定背景色 background color 3.設定背景是否重複 background repeat,其值有四個 a.repeat 背景圖重複,即平鋪 預設值 b.repeat x 橫向平鋪 c.repeat y 縱向平...