小编use*_*332的帖子

CSS selector that match every elements which may contains text?

Is there any way to select elements which may contains text?

Something like this:

*:text {
   font-size: 12px;
}
Run Code Online (Sandbox Code Playgroud)

I want to use it for my reset.css, but I can't find a way how to do it, so for now I use this code:

* {
   font-size: 12px;
}
Run Code Online (Sandbox Code Playgroud)

This solution works for all text based elements (for example STRONG, P, A, etc.), but it also apply this style to non-text elements like IMG, OBJECT and others.

So I …

css css-selectors

5
推荐指数
2
解决办法
8693
查看次数

标签 统计

css ×1

css-selectors ×1