:blank¶
Псевдокласс :blank
представляет пустые элементы, иными словами такие, которые не содержат дочерних элементов или текста. По своему действию похож на :empty
, но :blank
, в отличие от него, считает пустыми элементы, содержащие пробел или перенос строк.
Псевдоклассы
- :active
- :any-link
- :blank
- :checked
- :current()
- :default
- :defined
- :dir()
- :disabled
- :empty
- :enabled
- :first
- :first-child
- :first-of-type
- :focus
- :focus-visible
- :focus-within
- :fullscreen
- :future
- :has()
- :host
- :host()
- :host-context()
- :hover
- :indeterminate
- :in-range
- :invalid
- :is()
- :lang()
- :last-child
- :last-of-type
- :left
- :link
- :local-link
- :not()
- :nth-child()
- :nth-col()
- :nth-last-child()
- :nth-last-col()
- :nth-last-of-type()
- :nth-of-type()
- :only-child
- :only-of-type
- :optional
- :out-of-range
- :past
- :placeholder-shown
- :read-only
- :read-write
- :required
- :right
- :root
- :scope
- :target
- :target-within
- :user-invalid
- :valid
- :visited
- :where()
Синтаксис¶
*:blank {
property: value;
}
Спецификация¶
Пример¶
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>blank</title>
<style>
span:empty {
background: red;
padding: 3px;
margin-left: 7px;
display: inline-block;
}
</style>
</head>
<body>
<p>Линеарная фактура, в том числе, иллюстрирует фузз, и здесь мы видим
ту самую каноническую секвенцию с разнонаправленным шагом
отдельных звеньев<span></span></p>
</body>
</html>
Ссылки¶
- Псевдо-класс :blank MDN (рус.)