07 設定文字樣式

2021-07-27 19:55:34 字數 1659 閱讀 3853

html5

border: medium solid red;

width: 400px;

background-color: lightgrey;

padding: 10px;

text-justify:

/* 處理空白

whitespace屬性控制瀏覽器對空白字元的處理方式

*/

white-space: pre-line;
/* 指定文字方向 */

direction: rtl;
direction: ltr;
/* 指定單詞,字母,行之間的間距 */

letter-spacing: 10px;

word-spacing: 10px;

line-height: 30px;

border: thin solid red;

/* 控制斷詞

單詞超過邊界截斷or不截斷

*/

word-wrap: break-word;

/* word-wrap: normal; 預設*/

border: thin solid red;

height: 120px;

width: 130px;

/* 首行縮排 */

text-indent: 10%;
/* 文字裝飾與大小寫轉換 */

text-decoration: blink;

text-transform: capitalize;

/* 建立文字陰影

text-shadow:水平偏移,垂直偏移 模糊程度 陰影顏色

*/

text-shadow: 10px 20px 1px red;
/*################ 使用字型

font-family:設定字型,後面為備用字型

font-style:字型樣式,斜體,假斜體,正常字型

font-weight:粗細程度

*/

font-family: "微軟雅黑", fantasy;

font-size: smaller;

font-style: italic;

font-weight: bold;

/* 使用web字型 */

@font-face

font-family: mystyle, fantasy;

table: 指定物件作為塊元素級的**。類同於html標籤(css2) inline-table:

指定物件作為內聯元素級的**。類同於html標籤(css2) table-caption:

指定物件作為**標題。類同於html標籤<(css2)table-cell: 指定物件作為**單元格。類同於html標籤

table-row: 指定物件作為**行。類同於html標籤

start

end

left

right

justify

center

placeholder文字設定樣式

placeholder佔位符文字,也可以設定對應的顏色,透明度等樣式,具體如下 placeholder字型顏色 webkit input placeholder moz placeholder moz placeholder ms input placeholder 特別注意 從 firefox 1...

css設定文字樣式

載入 img src alt 未載入成功 title 滑鼠放在上提示 文字樣式 行高 line height 文字縮排 text indent 字型大小 font size 字型型別 font family 字型傾斜 font style italic 字型不傾斜 font style normal...

CSS 07 CSS文字設定

1 doctype html 2 html 3 head 4 meta charset utf 8 5 title title 67 891011 1213 1415 16 style type text css 17.text 27style 28head 29 body 30 div class...