位置:首頁 > 軟件操作教程 > 編程開發(fā) > HTML > 問題詳情

HTML屬性標(biāo)簽7

提問人:劉團(tuán)圓發(fā)布時(shí)間:2020-10-10

css規(guī)則

1.繼承

例:<html>

<head>

<style type="text/css">

<!--

td{font-size:12pt}

p{color:red}

-->

</style>

</hesd>

<body>

<table width="300" border="1" height="150">

<tr>

<td>

<p>css規(guī)則</p>

</td>

</table>

</body>

</html>

<p>為最高級(jí)<td>次一級(jí)兩種css用在一個(gè)屬性元素上,相同的覆蓋,不同的繼承,

2.組合

:td{font-size:12pt}

p1{font-size:12pt}

組合后

td,.p1{font-size:12pt}

3.層疊

在樣式里定義過后,在表格屬性中又定義一次

<html>

<head>

<style type="text/css">

<!--

red{color:#ff0000 limportant}

-->

</style>

</hesd>

<body>

<table width="300" border="1" height="150">

<tr>

<td style="color:#0000ff">決撒地方官</td>

</tr>

</table>

</body>

</html>

css單位

分四大類:

1 長度單位

數(shù)值可以是整數(shù),小數(shù),正數(shù),負(fù)數(shù),0,后加單位(負(fù)值不要輕易使用)

換算關(guān)系:

1in(英寸)=6pc()

1in(英寸)=72pt()

1in(英寸)=2.54(厘米)

1cm(厘米)=10mm(毫米)

1cm(厘米)=0.3937(英寸)

1pt()=1/72in(英寸)=0.2478mm(毫米)

1pc()=1/6in(英寸)=我國新四號(hào)鉛字的尺寸

2 百分比單位

3 顏色單位

4 url單位

div屬性

color : #999999   文字顏色

font-family : 宋體 文字字型

font-size : 10pt 文字大小

font-style:itelic 文字斜體育

font-variant:small-caps 小字體

letter-spacing : 1pt 文字間距

line-height : 200% 設(shè)定行高

font-weight:bold 文字粗體

vertical-align:sub 下標(biāo)字

vertical-align:super 上標(biāo)字

text-decoration:line-through ?h除線

text-decoration:overline 加頂線

text-decoration:underline 加底線

text-decoration:none ?h除連接底線

text-transform : capitalize 首字大寫

text-transform : uppercase 英文大寫

text-transform : lowercase 英文寫

text-align:right 文字*右對(duì)齊

text-align:left 文字*左對(duì)齊

text-align:center 文字置中對(duì)齊

這些是一些簡單的文字效果,可以應(yīng)用到css的頁面中。 

背景

background-color:black 背景顏色

background-image : url(image/bg.gif) 背景圖片

background-attachment : fixed 固定背景

background-repeat : repeat 重復(fù)排列-網(wǎng)頁預(yù)設(shè)

background-repeat : no-repeat 不重復(fù)排列

background-repeat : repeat-x x軸重復(fù)排列

background-repeat : repeat-y y軸重復(fù)排列

background-position : 90% 90% 背景圖片xy軸的位置  

鏈接

A 所有超連接

A:link 超連接文字格式

A:visited 瀏覽過的連接文字格式

A:active 按下連接的格式

A:hover 鼠標(biāo)移至連接

邊框

border-top : 1px solid black 上框

border-bottom : 1px solid #6699cc 下框

border-left : 1px solid #6699cc 左框

border-right : 1px solid #6699cc 右框

border: 1px solid #6699cc 四邊框

虛線

<TEXTAREA STYLE="border:1px dashed pink">

實(shí)線

<TEXTAREA STYLE="border:1px solid pink">

繼續(xù)查找其他問題的答案?

相關(guān)視頻回答
回復(fù)(0)
返回頂部