以下為本站文章分類清單

  1. AJAXspacer
  2. ASPspacer
  3. CSSspacer
  4. Javascriptspacer
  5. Windows 應用程式spacer
  6. 網頁設計
  7. 評論、短文、雜文spacer
  8. 版主spacer
  9. 最新回應spacer

以下為本頁本文內容

什麼是CSS

Style sheets (或是一般稱之為 cascading style sheets 簡稱 CSS) 是一群體裁定義的集合。另一種說法則是定義一個屬性群組讓流覽器知 道如何來顯示一份 HTML 中的元件--例如,顯示文字為綠色、斜體的 Arial 字體。 您可以在 HTML 文件檔中定義這種體裁或是在其他檔案 中(稱為外部檔案)定義經由連結的方式到 HTML 文件中。如果是一個外 部檔案,那麼一個外部檔案可以提供給多個 HTML 文件來 使用甚至是 整個網頁的資料。這樣讓整個網頁的維護來的更容易。

就像 Cascading Style Sheets 字面上的含義, 可以一次使用超過一個以上的 style sheet 在同一份文件中, 以不同的層級來顯示。(譯者按;cascade 本身是瀑布的意思,在中文視窗中向來把這個字稱為"重疊"。 Cascading Style Sheet 各位想像成同時好幾頁一起顯示出來,有上下層的關係時,那麼 style sheet 中文是什麼意思就不重要了) 如果對 HTML 元件的定義重覆而且不相同時,以最接近 HTML 元件的定義為準。 例如:使用 span 指令時直接定義其體裁,但在文件一開始的地方也有對 span 定義,那麼 使用時的定義會生效 ( 如果您有點迷惑,別緊張,往下看就明白) 如果上述的重覆定義是發生在同一段程式碼中(譯者按:好比在文件啟始就定義,但定義了兩次) 那麼後來定義的那份是有效的定義。

因此 style sheets 是怎麼產生效用的呢? 好比您想建立一頁資料,資料中每個使用到 <H3>的段落文字都要是 綠色、斜體、字體是 Arial。 在沒有 CSS 之前,您每次用到<H3> 都 必需這麼寫

<EM><FONT face="Arial" color="green"><H3>字體是 Arial 綠色、斜體的 H3 標題體裁. </H3></FONT></EM> 

但是 CSS 讓您能一次把指定 所有的 <H3> 標題定義完成,稱之為 selector

h3 { font-family: Arial; font-style: italic; color: green } 

體裁元件 (在這裡的例子是 <H3> 標題文字) 是依據 體裁定義, 來描述。語法如;Font-family: Arial 和<FONT face="Arial">有相同效果; font-style: italic 則和 <EM>有相同效果; color: green 則是表示 <FONT color="green">. 因此,一旦這種體裁先前己經在 HTML 文件中定義使用過了 (參考 應用在文件中), 每個 <H3> 標題都會是綠色、斜體的 Arial 保留原有的 HTML 特徵.

下一頁:應用在文件中

以下為文章回應區

同意轉載,不過麻煩看一下轉載需知

mypaper.pchome.com.tw   2017/8/12 下午 05:58:00

What's up every one, here every one is sharing these kinds of know-how,
so it's fastidious to read this web site, and I used to visit
this webpage all the time.

How can you heal an Achilles tendonitis fast?   2017/8/4 下午 02:01:00

If some one wishes to be updated with newest technologies then he must be visit this web page and be up to date
all the time.

fideliapasquarielloo.wordpress.com   2017/7/31 上午 12:16:00

Wow that was unusual. I just wrote an incredibly long
comment but after I clicked submit my comment didn't show up.
Grrrr... well I'm not writing all that over again. Anyway,
just wanted to say superb blog!

How did the Achilles tendon get it's name?   2017/7/28 下午 09:31:00

Hey there! This post couldn't be written any better!
Reading this post reminds me of my previous room mate! He always kept
chatting about this. I will forward this write-up to him.
Pretty sure he will have a good read. Many thanks for sharing!

What do you do for a sore Achilles tendon?   2017/7/28 上午 12:11:00

I every time spent my half an hour to read this blog's articles or reviews everyday along with a mug of coffee.

What is leg length discrepancy?   2017/7/21 下午 07:14:00

Hiya! I know this is kinda off topic but I'd figured I'd ask.
Would you be interested in trading links or maybe guest authoring a blog article or vice-versa?

My website discusses a lot of the same topics as yours and I feel
we could greatly benefit from each other. If you're
interested feel free to shoot me an email. I look forward
to hearing from you! Wonderful blog by the way!

foot pain exercises pdf   2017/7/3 下午 08:29:00

Hello there, You have performed an incredible job.
I will definitely digg it and in my view recommend to my friends.
I am confident they will be benefited from this website.

foot pain during yoga   2017/7/3 上午 09:50:00

We're a bunch of volunteers and opening a new scheme in our community.
Your web site offered us with valuable info to work
on. You have done a formidable job and our whole neighborhood might be thankful
to you.

foot pain in the arch   2017/6/21 下午 03:41:00

Howdy very nice blog!! Man .. Beautiful .. Wonderful .. I'll bookmark
your blog and take the feeds also? I am glad to search out a lot of useful information here in the submit, we
want develop extra strategies in this regard, thank you for sharing.
. . . . .

http://alessandramccalop.wordpress.com   2017/6/17 上午 12:28:00

I like the valuable info you provide in your articles. I'll bookmark your weblog and check again here regularly.

I am quite certain I'll learn plenty of new stuff right here!
Good luck for the next!

mirnalamattina.hatenablog.com   2017/6/11 上午 05:28:00

Amazing! This blog looks just like my old one!
It's on a entirely different topic but it has pretty much the same layout and design. Excellent choice of colors!

manicure   2017/5/4 上午 04:58:00

This is very interesting, You're a very skilled blogger.
I've joined your rss feed and look forward to seeking
more of your fantastic post. Also, I have shared your website in my social
networks!

manicure   2017/5/3 下午 09:23:00

What's Happening i am new to this, I stumbled upon this I have found It absolutely
helpful and it has aided me out loads. I'm hoping to contribute & assist different customers like its helped
me. Great job.

BHW   2017/4/13 下午 07:57:00

Thanks for your personal marvelous posting! I certainly enjoyed reading it, you can be a great author.I will always bookmark your blog and will eventually come back later in life.
I want to encourage continue your great work, have a nice day!

給個回應
姓名:
佈落格網址:
  如果您是要發問問題, 最好有個問題測試的網址, 這樣比較容易找到您問題所在, 謝謝
內容: