雅虎香港 搜尋

搜尋結果

  1. 2014年6月4日 · 實用版面教學. 教學 | CSS Q&A 問答集. 本篇整理一些較實用和常被問到的CSS語法問題,之後會陸續更新. 有CSS相關的問題也可以在本篇留言,若是針對分享的樣式問題則還是到該篇分享文章留言喔 🙂. (請點選問題,答案會自動出現在問題下方。 若無法點選請重新整理網頁,有時是因為網頁還在載入資料中) ‌. A. 刪除部落格上不必要的區塊. 1 – 如何刪除部落格上方出現的快捷功能BAR? 2 – 如何刪除側欄上MIB的廣告? 3 – 如何刪除文章結尾出現的廣告? 4 – 如何刪除文章結尾出現的”你可能會有興趣的文章”? 5 – 如何刪除文章結尾的全站分類、個人分類、歷史上的今天等拉哩拉紮的東西? ‌. B. 有關CSS語法部分. 1 – 該怎麼將部落格標題用圖片取代?

    • Overview
    • CSS 宣告
    • CSS 宣告區塊
    • CSS rulesets
    • CSS statements
    • See also

    串接式樣式表 (CSS) 語言的基礎目標是是讓瀏覽器引擎用特定的功能將元素寫在頁面上,像是顏色、位置與裝飾。CSS 語法反映出了目的,而它的基本組成為:

    •屬性為人可閱讀的識別碼,定義使用哪項功能。

    設定特定參數值給 CSS 屬性是 CSS 語言的核心功能。一對屬性與參數叫做宣告,而為了適當的排版與套用樣式,任何 CSS 引擎會演算每個頁面上的元素該套用哪個宣告。

    在 CSS 中屬性與參數都預設為不區分大小寫。它們由冒號區隔,':' (U+003A COLON),而在屬性與參數前、中間與後面並不需要有空白,空白會被忽略。

    Declarations are grouped in blocks, that is in a structure delimited by an opening brace, '{' (U+007B LEFT CURLY BRACKET), and a closing one, '}' (U+007D RIGHT CURLY BRACKET). Blocks sometimes can be nested, so opening and closing braces must be matched.

    Such blocks are naturally called declaration blocks and declarations inside them are separated by a semi-colon, ';' (U+003B SEMICOLON). A declaration block may be empty, that is containing null declaration. White spaces around declarations are ignored. The last declaration of a block doesn't need to be terminated by a semi-colon, though it is often considered good style to do it as it prevents forgetting to add it when extending the block with another declaration.

    If style sheets could only apply a declaration to each element of a Web page, they would be pretty useless. The real goal is to apply different declarations to different parts of the document.

    CSS allows this by associating conditions with declarations blocks. Each (valid) declaration block is preceded by one or more comma-separated selectors which are conditions selecting some elements of the page. The pair selector group-declarations block is called a ruleset, or often simply a rule.

    Rulesets are the main building blocks of a style sheet, which often consists of only a big list of them. But there is other information that a Web author wants to convey in the style sheet, like the character set, other external style sheets to import, font face or list counter descriptions and many more. It will use other and specific kinds of statements to do that.

    A statement is a building block that begins with any non-space characters and ends at the first closing brace or semi-colon (outside a string, non-escaped and not included into another {}, () or [] pair).

    There are two kinds of statements:

    •Rulesets (or rules) that, as seen, associate a collection of CSS declarations to a condition described by a selector.

    •At-rules that start with an at sign, '@' (U+0040 COMMERCIAL AT), followed by an identifier and then continuing up the end of the statement, that is up to the next semi-colon (;) outside of a block, or the end of the next block. Each type of at-rules (en-US), defined by the identifier, may have its own internal syntax, and semantics of course. They are used to convey meta-data information (like @charset (en-US) or @import (en-US)), conditional information (like @media (en-US) or @document (en-US)), or descriptive information (like @font-face).

    Any statement which isn't a ruleset or an at-rule is invalid and ignored.

    •CSS 重要概念:

    •CSS 語法

    •@ 規則 (en-US)

    •註釋 (en-US)

    •優先級 (en-US)

    •繼承

  2. 2020年9月25日 · 1. 對於初學者來說,在我們移步至更加高級的選擇器之前,讓我們先攻克這些顯而易見的。 星號標誌會指向頁面上所有的元素。 很多程序猿都會用這個訣竅來將 margin 和 padding 歸零。 雖說這個對於一個快速的測試是肯定沒問題的,但是我建議你永遠都不要將其應用於生產環境的代碼中。 它為瀏覽器帶來太多 負擔 ,而且是完全沒必要的。 星號 * 可以同時被用於子對象選擇器中。 這樣可以指向所有的 #container div 的子對象。 同樣的,如果可能的話,盡可能不要使用這個方法。 觀看演示. 兼容性. IE6+. Firefox. Chrome. Safari. Opera. 2. #X. 在選擇器前面加井號鍵可以允許我們指向 id 。

  3. 2024年7月5日 · 在學期間初學網頁設計整理的語法/好用工具. 不定期更新 看到好用的就放上來這邊. 蒐集樣式/模板的網站. https://codemyui.com. 顏色選擇區 適合UI視覺設計師. https://randoma11y.com/ Bootstrap 視覺化排版. https://layoutit.com/build. grayshine 的 CSS筆記. https://hackmd.io/@grayshine/ryVK07EUK. CSS 樣式彙整-前端筆記. CSS 漸層. CSS 動畫. Underlines 下劃線. 假圖假字圖片. HTML 模板. CSS模板. 圖片填滿/圖片比例. 字體單位設定. overflow. border-radius: Html iframe.

  4. CSS 的全名為 Cascading Style Sheets是一種樣式表 (Stylesheet) 語言。. 它的目的是為了對 XHTML 及 HTML 之類的標記語言 (markup language) 提供一個顯示層。. 有了 CSS,我們就可以將資料層及顯示層分開:HTML 文件就只包括資料,而 CSS 則是告訴瀏覽器這些資料應該要如何 ...

  5. 2024年3月25日 · CSS 是 “Cascading Style Sheets的縮寫中文譯為層疊樣式表”。. CSS 是一種標記語言,它的主要功能是為結構化文件(如 HTML 文件或 XML 應用)添加風格(字體、間距和顏色等)。. 網頁設計,仰賴 HTML 和 CSS 兩種不同的語言。. HTML 處理內容,CSS 則定義 ...

  6. 2023年8月17日 · 本文件闡明了必須掌握的10個基本CSS語法,作為專業人士追求創建一致且高效網頁設計的全面指南。 1. 選擇器與屬性. 選擇器讓您針對HTML文檔中的特定元素進行樣式應用。 屬性則定義樣式的外觀。 使用通用選擇器. 通用選擇器針對HTML文檔中的所有元素。 它特別適用於應用全局樣式,例如重設邊距和填充。 css. Copy code. * { margin: 0 ; padding: 0 ; } 此代碼將網頁上每個HTML元素的所有邊距和填充重設為零。 類選擇器針對共享相同類屬性的元素。 它使您能夠在各種元素中應用一致的樣式,無需重複代碼。 css. Copy code. .my-class { color: red; } 此代碼將顏色紅色應用於具有類名 my-class 的任何元素。