本文介紹了為什么叫偽類?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
a:hover
為什么叫偽類"?
與類"的概念有什么相似之處嗎?
Are there any similarities with the concept of "class"?
推薦答案
在 CSS 術語中,類是一個以句號開頭的選擇器,例如
In CSS terms, a class is a selector that starts with a full stop, e.g.
.foo { ... }
它會以表格形式使用
<div class="foo">
類"的這種用法更多是指具有共同特征并通過種類或質量與其他事物區分開來的一組或類別的事物",而不是借用面向對象的術語.
This use of "class" is more in the sense "a set or category of things having a common characteristic and differentiated from others by kind or quality", rather than borrowing from OO terminology.
偽類不是一個真正的類",因為用戶代理定義了何時和/或多少內容符合條件(如 :hover
、:active
等).
A pseudo class is "not quite a real one" as the user agent defines when and/or how much content qualifies (like :hover
, :active
, etc).
這篇關于為什么叫偽類?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!