網頁的本質就是超級文本標記語言,通過結合使用其他的Web技術(如:腳本語言、公共網關接口、組件等),可以創造出功能強大的網頁。因而,超級文本標記語言是萬維網(Web)編程的基礎,也就是說萬維網是建立在超文本基礎之上的。超級文本標記語言之所以稱為超文本標記語言,是因為文本中包含了所謂“超級鏈接”點。 【實例介紹】 css字體變體font-variant fom-variant屬性用于設置小型大寫字母的字體顯示文本,這意味著所有的小寫字母均會被轉換為大寫,但是所有使用小型大寫字體的字母與其余文本相比,其字體尺寸更小。 【基本語法】 font-variant:變體屬性值 【語法介紹】 在font-variant屬性中,可以設置的值只有兩個,一個是normal,表示正常顯示,另—個是small-caps,它能將小寫的英文字母轉化為大寫字母且字體較小。 【實例代碼】
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文檔</title>
</head>
<style type="text/css">
.j {
font-family: "宋體";
font-size: 16px;
font-variant: small-caps;
}</style>
</head>
<body class="j">
Located at the center of the mainland's coastline, Shanghai
has long been a major hub of communications, transportation,
and international exchange. The municipality covers an area
of 6,341 square kilometers and has a population of more
than 13.5 million. Shanghai is China's largest economic
comprehensive industrial base, and a famous historical and
cultural city.
</body>
</html>
【代碼分析】 此段代碼中首先定義了font-variant屬性為small—caps,然后在正文中對文本應用j樣式,在瀏覽器中預覽效果,如圖所示,可以看到小寫的英文字母已轉變為大寫。 
【素材及源碼下載】 請點擊:cs字體變體font-variant 下載本實例相關素材及源碼
網站建設是一個廣義的術語,涵蓋了許多不同的技能和學科中所使用的生產和維護的網站。 |