你需要通过伪类(pseudo-class)来控制这些效果。 伪类是什么? 伪类(pseudo-class)是指可以在HTML元素定义CSS属性的时候将条件和事件考虑在内。 我们来看一个例子。
基于330个网页-相关网页
You can add a pressed button state with CSS by styling the active pseudo-class of the link in question.
你可以通过配置CSS中链接的active伪类来添加一个按下的按钮状态。
A pseudo-class always consists of a "colon" (:) followed by the name of the pseudo-class and optionally by a value between parentheses.
开头,冒号后面是伪类的名称和包含在圆括号中的可选参数。
Using pseudo class selectors to change content?
使用伪类选择器来改变内容?
应用推荐